欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

npm Err! Unexpected end of JSON input while parsing near

程序员文章站 2022-05-30 16:33:29
...

You are trying to create a new angular, react, vue app, and you end up with an error message saying:

npm ERR! Unexpected end of JSON input while parsing near

npm Err! Unexpected end of JSON input while parsing near

There’s a high chance that your npm cache been damaged.

Try:

npm cache clean --force

npm Err! Unexpected end of JSON input while parsing near

If you are a windows user, try deleting all files in this folder:

C:\Users{{your-username}}\AppData\Roaming\npm-cache

Then…

npm cache verify

If that doesn’t work, try updating to the lastest (understand the risks)

npm i [email protected] -g

I hope this helps!

Computer Science is evolving so fast… I’m eternally a student. Here’re some of my notes.

npm Err! Unexpected end of JSON input while parsing near

相关标签: Node.js