Actual Behavior:
User tries to install npm packages using npm i
, and gets an error message saying:
npm ERR! Unexpected end of JSON input while parsing near...
Possible Solutions:
- Clear the npm cache:
npm cache clean --force
- Try updating to the latest npm:
npm i npm@latest -g
- Try deleting
package-lock.json
file. It keeps track of exact version of every package that is installed.
rm package-lock.json
Top comments (0)