Reputation: 3798
Whenever I try to execute npm install
or npm i
, I get this error:
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'json-parse-helpfulerror'
I cannot update NPM through npm install npm -g
or npm i npm -g
, becuase it produces the same error. My computer was very low on space, and I have a feeling it might have deleted one of NPM's dependenices. The actual npm
command works though.
Is there any way to fix this?
Upvotes: 1
Views: 364
Reputation: 758
Reinstalling npm will fix the issue.
curl -L https://www.npmjs.org/install.sh | sh
If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer.
You can also try clearing the cache
npm cache clean
Upvotes: 1