本文介绍了NPM 安装错误:在“...nt-webpack-plugin"附近解析时 JSON 输入意外结束:“0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建新的 Angular 5 项目时:

When creating a new Angular 5 project:

节点版本:8.9.2

npm 版本:5.5.1

npm version: 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:UsersAashitecAppDataRoaming
pm-cache\_logs2017-12-06T13_10_10_729Z-debug.log

错误日志在这里

推荐答案

这帮我解决了:

以管理员身份打开 Windows Powershell

npm cache clean --force
npm install -g @angular/cli

https://devblogs.microsoft.com/premier-developer/getting-started-with-node-js-angular-and-visual-studio-code/

这篇关于NPM 安装错误:在“...nt-webpack-plugin"附近解析时 JSON 输入意外结束:“0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-19 05:06