Open paulmccarthy opened 6 years ago
I have just had a similar issue, outputing the following error message on npm install or attempts to install react-router.
The log file states:
12 silly install loadShrinkwrap
13 verbose stack SyntaxError: Unexpected token < in JSON at position 79153
13 verbose stack at JSON.parse (
A reinstall of node didn't fix the issue and brought the node & npm versions to v8.6.0 and v5.4.2 respectively. Deleting the package-lock.json file fixed the issue.
I'm opening this issue because:
What's going wrong?
npm-shrinkwrap is being updated with devDependencies.
How can the CLI team reproduce the problem?
Use npm init to create a package.json npm shrinkwrap
Confirm that npm-shrinkwrap.json contains no dependencies: https://gist.github.com/paulmccarthy/ed0d21df9b69fcf7c4a5bc572872f78c
npm install --save-dev mocha chai
npm-shrinkwrap is updated with devDependencies: https://gist.github.com/paulmccarthy/ff37c01767f1a65227a98c06b9963b10
supporting information:
npm -v
prints: 5.4.2node -v
prints: v8.6.0npm config get registry
prints: https://registry.npmjs.org