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

There’s a high chance that your npm cache been damaged.
Try:
npm cache clean --force

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 npm@latest -g
I hope this helps!
Computer Science is evolving so fast… I’m eternally a student. Here’re some of my notes.

在创建新的angular、react或vue应用时,遇到了npm错误:'Unexpected end of JSON input while parsing near...'。这可能是npm缓存损坏导致的。建议删除npm缓存文件夹后再试,或者更新到最新版npm。这是一个关于如何解决此类问题的简要指南。
1845

被折叠的 条评论
为什么被折叠?



