问题描述
在angular项目中执行ng new project-name
时出现以下错误
Got the following error while executing ng new project-name
in angular project
npm WARN deprecated [email protected]: CircularJSON 仅在维护中,flatted 是它的继任者.
npm 错误!解析 '...:"~0.0.0","webpack-de' 附近时 JSON 输入意外结束
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 输入意外结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!