Installing npm packages on Kudu doesn't seem to have any effect

Earlier today, I executed npm install and the node_modules directory was created with all the necessary files.

However, a few hours later, when I ran the same command with the same package.json file, there were no errors, but the node_modules directory was created empty!?

Any thoughts on why this might be happening?

Here is my package.json file, which was generated very simply by using npm init and adding the tedious package:

{
  "name": "tedious",
  "version": "2.1.1",
  "description": "Connect to Database",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/tediousjs/tedious.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/tediousjs/tedious/issues"
  },
  "homepage": "https://github.com/tediousjs/tedious#readme"
}

Answer №1

Your package.json file does not list any dependencies.

To add the npm modules you need, simply include them in the dependencies section of your package.json, and then run the command npm install to download and install them.

"dependencies": {
    "lodash": "^4.17.19",
    "axios": "^0.21.1",
    ...................
}

Alternatively, you can use the following command:

npm install <package_name> --save
.

For more information, check out this guide: Using a package.json.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the optimal ranking system for learning in Mongodb using Node.js and Express? How can we best utilize these

1 - What is the recommended order for learning (Mongo db,Node.js,Express)? 2 - Is this platform compatible with both web and mobile devices? 3 - Can you explain the functionalities of the programs? 4 - I'm planning to integrate it into my Flutter m ...

Unable to retrieve the body from an HTTP POST request in NextJS

Currently stuck and seeking assistance to uncover the missing piece that is preventing progress. The goal is to obtain access to the body of a POST request, as demonstrated on this page from Next.js: https://nextjs.org/docs/pages/building-your-application ...

Generating Graphql types for React using graphql-codegen when Apollo Server is in production mode: A step-by-step guide

Everything functions perfectly when backend mode is set to NODE_ENV: development, but in production mode I encounter an error with graphql-codegen: Error on local web server: Apollo Server does not allow GraphQL introspection, but the query contains _sc ...

Variability in Swagger parameter declaration

Is it possible to specify input parameters in Swagger with multiple types? For example: Consider an API that addresses resources using the URL http://localhost/tasks/{taskId}. However, each task contains both an integer ID and a string UUID. I would like ...

Utilizing postBack to send chatbot responses with BotFramework v4 and Node.js

I'm looking to send a postBack text message to my bot, but I need help with the correct syntax. Here's the code snippet: if (postback.payload == "WHAT_IS_MENTAL_HEALTH") { await turnContext.sendActivity("TO-DO: Forward on 'What Is Me ...

The 'default' property in Topojson is currently not defined

I've been grappling with this issue for the past hour to no avail. My current task involves working with d3-world-maps, which has a dependency on topojson. The problem seems to be stemming from within the d3-world-maps package: var _topojson = requi ...

Having difficulty updating my npm package manager for node

When attempting to update my node package manager using the command npm install -g npm on my Windows system, I encountered an error that prevented me from updating successfully. PS C:\Users\LENOVO\Desktop\Toggle-Theme> npm install -g ...

Can Badge Api be utilized for sending push notifications in web applications built with Node.js technology?

Our website is a cutting-edge social media web application with features that rival other popular social media apps. We are currently looking for a way to display badge notifications on the home screen. Despite our efforts, we have not yet found a suitab ...

What is the process for running child_process when a user clicks on a view in an application

Just starting out with Node.js and utilizing express along with hogan or moustache templating for my views. I've successfully used the following code in my routing files, index.js as shown below: /* Test Shell Execute. */ router.get('/shell&apo ...

What is the best way to achieve this in Node.js/Express using Redis? Essentially, it involves saving a callback value to a variable

Here is the data structure I have set up in redis. I am looking to retrieve all values from the list and their corresponding information from other sets. Data structure : lpush mylist test1 lpush mylist test2 lpush mylist test3 set test1 "test1 value1" ...

TypeORM mishandles date insertion when interacting with Microsoft SQL Server

I encountered an unusual issue with TypeORM (v0.2.45) when using Microsoft SQL Server (mssql v6.3.1). In my Entity, the columns of type date seem to subtract a day from the date upon insertion, for example: @Entity("employees") export class Empl ...

The error message "res.jwt is not a function" is commonly encountered when using Node

I kept receiving the error message: res.jwt is not a function I have installed jwt-express and imported it like this: import jwt from 'jwt-express' This is my auth.js file: import Account from '../services/account.js' import env from ...

Is the memory usage of node.js proportional to the number of concurrent requests, or is there a potential memory leak?

Running the following node.js code: var http = require('http'); http.createServer(function(req,res){ res.writeHead(200,{'Content-Type': 'text/plain'}); res.write("Hello"); res.end(); }).listen(8888); Upon starting the server ...

When the system is rebooted, the terminal fails to acknowledge npm and node commands

After installing node and npm using nvm, a message appeared at the end of the installation process: Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && &bso ...

Dual Networked Socket.IO Connection

I have set up a node.js server with an angular.js frontent and I am facing a problem with Socket.IO connections. The issue arises when double Socket.IO connections open, causing my page to hang. var self = this; self.app = express(); self.http = http.Ser ...

Error encountered in Ubuntu while attempting to run a Python script within a Node.js/Express application: spawn EACCES

Recently, I set up a node.js server to run a python script using the python-shell . However, after migrating from Windows to Ubuntu, an EACCES error has been persistently popping up. Despite my attempts to adjust permissions and troubleshoot, I haven' ...

Use gulp to quickly install google-webfonts with npm

Can anyone advise on whether gulp google-webfonts should be installed with --save-dev for devDependencies or --save for bower.json dependencies? I am currently working on a project using Yeoman scaffolding with gulp and I am unfamiliar with this process. ...

The Jest Haste Map has detected a naming collision with the @providesModule

Currently, we are facing an issue with migrating our test cases to Jest in our Node app. While everything works smoothly in our local development environment, configuring CI on Jenkins has been problematic as we encounter numerous @providesModule naming co ...

Is there a way to navigate to a newly created document?

Is there a way to automatically redirect a user to the show action of a document or post they have just created using express.js? Take a look at the following code snippet, which outlines how I am creating the document: app.post('/document/create&ap ...

The issue encountered while trying to install a BigCommerce theme using npm is due to the existing path not being an empty directory. This error is triggered by the fatal message: "destination path 'PATH'

Having explored numerous answers on Stack Overflow regarding the 'fatal: destination path already exists and is not an empty directory' issue, none of them seem to address my specific situation. The problem arises when I attempt to update a brok ...