npm ERR!解析时JSON输入意外结束 [英] npm ERR! Unexpected end of JSON input while parsing
问题描述
在角度项目中执行ng new project-name
时遇到以下错误
Got the following error while executing ng new project-name
in angular project
npm WARN已弃用circular-json@0.5.9:CircularJSON仅在维护中,flatted是其继任者.
npm ERR!解析'...:〜0.0.0","webpack-de'
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 ERR!可以在以下位置找到此运行的完整日志:
npm ERR! 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'
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
操作系统:Windows
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 ERR!解析时JSON输入意外结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!