NPM安装错误:解析"... nt-webpack-plugin"附近的JSON输入时意外结束:"0" [英] NPM Install Error:Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'

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

问题描述

创建新的Angular 5项目时:

When Creating a new Angular 5 project:

节点版本:8.9.2

node version: 8.9.2

npm版本:5.5.1

npm version: 5.5.1

我的命令是

npm install -g @angular/cli

错误是

npm ERR! 在'... nt-webpack-plugin:" 0附近进行解析时,JSON输入意外结束了

npm ERR! Unexpected end of JSON input while parsing near '...nt-webpack-plugin":"0'

npm ERR!可以在以下位置找到此运行的完整日志:C:\ Users \ Aashitec \ AppData \ Roaming \ npm-cache_logs \ 2017-12-06T13_10_10_729Z-debug.log

npm ERR! A complete log of this run can be found in: C:\Users\Aashitec\AppData\Roaming\npm-cache_logs\2017-12-06T13_10_10_729Z-debug.log

错误日志为 http://www.aashitechno.in/2017- 12-06T13_10_10_729Z-debug.log

推荐答案

这为我解决了这个问题:

This solved it for me:

以管理员身份打开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"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆