David David - 1 year ago 125
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
Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download