Shivam Kumar
Shivam Kumar

Reputation: 98

npm- Unexpected end of JSON input while parsing near '...serify":"latest","cha'

Yesterday I uninstalled angular-cli to update to @angular/cli . But while trying to install @angular/cli, I'm getting this error:

Unexpected end of JSON input while parsing near '...serify":"latest","cha'

I've tried cleaning cache with npm cache verify --force, but the error is same always.

What should I do?

Upvotes: 0

Views: 350

Answers (2)

user10263899
user10263899

Reputation:

Just a shift from npm to yarn solved&worked for me! simply npm install -g yarn... this doesn't give that end of json##

Upvotes: 0

Sachin Gupta
Sachin Gupta

Reputation: 5301

In you package.json, you might have set some 'latest' for some npm package that may not support the latest. try using '*' or >=x.y.z versions for it. the package name ends with serify (as seen in the error message)

Upvotes: 1

Related Questions