npm install not creating node_modules folder

The issue seems to be self descriptive:

npm ERR! eisdir and is related to npm not being able to find a
package.json in

This means that npm install is not able to find the package.json file in the folder

You can run npm init on the folder. This will ask a series of project set up questions and at the end will create a package.json file.

Then you can run npm install -save-dev on the folder to install the dependencies


Try it with npm install --save


Please check your current directory. It should contain a package.json file with proper structure and dependencies.

https://docs.npmjs.com/files/package.json

If you don't have a package.json file, means you are creating a project from scratch. In this case you can create package.json file using following command.

npm init

and install the packages with providing the package name with npm install command. e.g. if you want to install express package. use the following command

npm install express --save

Here --save option will update you package.json file with the package and its version.