Installation: Nodejs V5.5.0
executable: sudo npm -v
Score:
Error: Cannot find module 'minimatch'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/rimraf/node_modules/glob/glob.js:44:17)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
Solution: Remove node and npm modules completely and reinstall them
Completely Uninstall Node.js from Mac OS X
The following is the best way to completely uninstall node + npm:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminalcheck your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well: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
Similar Posts:
- Cannot find module ‘../lib/utils/unsupported.js’
- After installing nodejs, running NPM – V will cause (module. JS: 339 throw err..) error. Solution
- How to Solve Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor’
- [Solved] Vue installs less Error: Failed to compile with 1 errors
- Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 7.x
- Solution to the failure of node rdkafka in docker build
- Module build failed: Error: Cannot find module ‘node-sass’
- [Solved] Nodejs Error: Cannot find module ‘express’
- [xviz] ./scripts/run-kitti-example.sh Excute Error: gyp ERR! Node-gyp failed to build your package.
- Mac: How to Solve Print: Entry, “:CFBundleIdentifier”, Does Not Exist