npm 错误!解析时 JSON 输入意外结束 [英] npm ERR! Unexpected end of JSON input while parsing

查看:50
本文介绍了npm 错误!解析时 JSON 输入意外结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在angular项目中执行ng new project-name时出现以下错误

Got the following error while executing ng new project-name in angular project

npm WARN deprecated circle-json@0.5.9: CircularJSON 仅在维护中,flatted 是它的继任者.
npm 错误!解析 '...:"~0.0.0","webpack-de' 附近时 JSON 输入意外结束

npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Unexpected end of JSON input while parsing near '...:"~0.0.0","webpack-de'

npm 错误!可以在以下位置找到此运行的完整日志:
npm 错误!C:\Users\Abhi\AppData\Roaming\npm-cache_logs\2018-12-13T10_24_02_151Z-debug.log
软件包安装失败,请参见上文.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Abhi\AppData\Roaming\npm-cache_logs\2018-12-13T10_24_02_151Z-debug.log
Package install failed, see above.

我尝试过的:
1. npm 缓存清理 --force
2. npm 缓存验证
3. npm 错误!解析 '...5.0","rimraf":"^2.2.8' 附近时 JSON 输入意外结束

What I have tried :
1. npm cache clean --force
2. npm cache verify
3. npm ERR! Unexpected end of JSON input while parsing near '...5.0","rimraf":"^2.2.8'

当前版本:
节点:10.14.2
NPM:6.5.0
操作系统:视窗

Current Versions:
Node : 10.14.2
NPM : 6.5.0
OS : Windows

推荐答案

您不需要卸载或安装任何东西.只是

You do not need to uninstall or install anything. Just

npm cache clean --force

然后

npm install

会做的.

这篇关于npm 错误!解析时 JSON 输入意外结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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