【发布时间】:2020-12-29 16:46:58
【问题描述】:
使用 Angular cli 创建新项目时,使用命令
ng new <project_name>
我收到以下错误
npm ERR! Unexpected end of JSON input while parsing near '...ae0e20ec","tarball":"'
我尝试使用 sudo 访问权限执行 ng 命令,但仍然遇到相同的错误。 我目前有,有角度的
Angular CLI: 10.0.8
Node: 10.19.0
OS: linux x64
和
NPM - 6.14.4
【问题讨论】:
-
尝试清理你的 npm 缓存:
npm cache clean --force -
这是一个非常旧的节点版本,我认为它不再受支持了
-
对不起,这是npm版本,node版本是10.19.0