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.
Remove this folder /usr/local/lib/node_modules/npm/node_modules/rimraf/node_modules
rm -rf /usr/local/lib/node_modules/npm/node_modules/rimraf/node_modules
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 .
sudo rm /usr/local/bin/npm
sudo rm /usr/local/share/man/man1/node.1
sudo rm /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm /opt/local/bin/node
sudo rm /opt/local/include/node
sudo rm -rf /opt/local/lib/node_modules
brew unlink nodejs
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.