[node.js] How do you reinstall an app's dependencies using npm?


Right way is to execute npm update. It's a really powerful command, it updates the missing packages and also checks if a newer version of package alreaddy installed can be used.

Read Intro to NPM to understand what you can do with npm.


Is there a simple way to reinstall all packages that my app depends on (i.e. they are in my apps node_modules folder)?

npm updated the install CLI command and added the --force flag

The -f or --force argument will force npm to fetch remote resources even if a local copy exists on disk.

npm install



node.js node.js   npm npm