I can\'t use npm install using the command prompt in NodeJS. I\'m getting these errors when running npm install:
module.js:339
I had the same error. npm uninstall npm -g, rm -rf node_modules didn't help me, because when I tried I was getting Error: Cannot find module 'semver'. But I solve my problem with these steps (this will delete other global modules you may be using):
sudo rm -rf /usr/local/lib/node_modulessudo rm -rf ~/.npmbrew uninstall --force nodebrew install nodeHope this will help those who are getting a similar problem.