jshint Error: Cannot find module 'underscore'

you can use npm update I test this command and this answer.


When you have cannot find module x errors, one thing that might help sometimes is deleting the whole npm_modules folder and just running npm install again.

Sometimes, on the initial npm install, it might of failed to get one dependency for a package and it won't try to get it again when you run npm install again, as it got all of the packages you wanted, just maybe not all the dependencies of those packages.


Do the following:

npm update
npm install underscore

If that doesn't work do the following.

rm -rf node_modules
npm install -d
npm update

Tags:

Javascript

Npm