Possible to install all missing modules for a node application?


Question

I have a node app that I just started working with and each time I try to run it, it says there is a missing module. I've just been using npm install ... for each module but after doing about 10 of them I'm wondering if there is a way to have npm pull down all needed modules for a node app without me installing each one manually. Can it be done?

1
32
11/2/2012 4:17:40 AM

Accepted Answer

Yes, as long as the dependency is listed in package.json.

In the directory that contains package.json, just type:

npm install
54
11/2/2012 5:21:52 AM

I created an npm module to handle installing missing modules automatically.

npm-install-missing

It will install all app dependencies and sub-dependencies automatically. This is useful when submodules aren't installed correctly.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon