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?
Yes, as long as the dependency is listed in package.json
.
In the directory that contains package.json
, just type:
npm install
I created an npm module to handle installing missing modules automatically.
It will install all app dependencies and sub-dependencies automatically. This is useful when submodules aren't installed correctly.