创建新的 Angular 5 项目时:
节点版本:8.9.2
npm 版本:5.5.1
我的命令是:
npm install -g @angular/cli
错误是:
npm ERR! **Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'**
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aashitec\AppData\Roaming\npm-cache_logs\2017-12-06T13_10_10_729Z-debug.log
原文由 kathir 发布,翻译遵循 CC BY-SA 4.0 许可协议
这为我解决了它:
以管理员身份 打开 Windows Powershell
https://devblogs.microsoft.com/premier-developer/getting-started-with-node-js-angular-and-visual-studio-code/