I update my Node.js
to 5.5.0.
But it does not work when i use npm.
It reports error:
Cannot find module 'minimatch'
.
But Node.js
version 4.2 is ok on my mac.
I update my Node.js
to 5.5.0.
But it does not work when i use npm.
It reports error:
Cannot find module 'minimatch'
.
But Node.js
version 4.2 is ok on my mac.
This happened to me when I updated my node through the binary but also had a previous version installed through homebrew . The way I resolved this was, uninstalling node and npm completely and reinstalling using the binary found on their website .
and reinstall .
I ran into probably the same exact problem as you.
I went from 4.2.3 LTS to 5.9, and all npm functionality ceased, always generating that error.
I had to do the following:
Everything was tip-top after that. I purged the folder after I noticed that there was the old 4.2.3 installer in the
Installer
directory. I didn't know what the ramifications of that were, but better safe than sorry.Remove this folder
/usr/local/lib/node_modules/npm/node_modules/rimraf/node_modules