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


Answers

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.

Question

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