angular - 错误!解析时 JSON 输入意外结束

标签 angular npm angular-cli

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

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! 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 输入意外结束

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

最佳答案

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

npm cache clean --force

然后

npm install

会做。

关于angular - 错误!解析时 JSON 输入意外结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53759929/

相关文章:

javascript - Angular 十进制管道点格式

node.js - mac 中的 "node-gyp rebuild"错误

angular - 从 angular 11.2 升级到 12.2 时出错-styles.css-错误 : (0 , _identifier.getUndoPath) 不是函数

Angular 遮挡 : X is not a known element

html - Angular 4提交表单后清空输入框

laravel - 在 multi ./src/main.js 中未找到此相关模块 : * ./src/main.js

node.js - 如何将 Node 模块包含在 Angular-CLI 构建中?

html - Angular-cli 从外部 url 添加样式

javascript - Firebase 更新嵌套数组中的对象

node.js - 无法设置node.js环境