Jeff
Jeff

Reputation: 8411

"npm init" does not create node_module folder and other files

sorry for novice question. I have already node in my system. node -v v4.4.0

npm -v
2.14.20

To make a new node project i have run the command npm init, but it only creates a pacakage.json file which contains general information.

Meanwhile I expect it to create basic essential files (a set of files and folder including node_module and index.js)

What should i do?

Upvotes: 1

Views: 3160

Answers (1)

Barak.H
Barak.H

Reputation: 36

After "npm init" you want to install the modules you need by running "npm install --save<-dev>". This will create a node_modules directory with the relevant modules and will add them to the package.json file so that executing "npm install" will auto' download and install them. Regarding auto generating files, some IDEs will do that for you.

Upvotes: 1

Related Questions