When Creating a new Angular 5 project:
node version: 8.9.2
npm version: 5.5.1
My Command is
npm install -g @angular/cli
Just faced the issue of Unexpected end of JSON input while parsing near.. while adding the 'radium' package in my React App. As a matter of fact, I am facing this issue even when trying to update the NPM to the latest version.
Anyways, NPM didn't work after clearing the cache and it also won't update to the latest version right now but adding the package via Yarn did the trick for me.
So, if you are in a hurry to solve this issue but you are not able to, then give yarn a try instead of npm.
Happy Coding!
After trying few things finally sudo npm cache clean --force worked for me.
This can be a temporary glitch in your network or with something else in the npm registry.