David David - 3 months ago 7
Node.js Question

Node install npm modules

I'd like to install npm modules based on package.json

I'd like to know if there is anyway to automate installing modules.

For instance dependencies of package.json is as follows.

"dependencies": {
"express": "3.1.0",
"jade": "*",
"stylus": "*",
"mongodb": ">= 0.9.6-7"

do I have to install modules one by one like this?

npm install express@3.1.0
npm install mongodb@0.9.6

and etc.

Any help would be appreciate.

str str

See the documentation about npm install.

By default, npm install will install all modules listed as dependencies in package.json.

So you can just type npm install.