由于已弃用的circular-json,角度项目创建失败

sav*_*vvy 6 javascript node.js npm typescript angular

我用以下命令创建了新的角度项目

ng new hello-world
Run Code Online (Sandbox Code Playgroud)

它失败了

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 '...rocess":"~0.7.0"},"_h'
Run Code Online (Sandbox Code Playgroud)

然后我安装平板使用...

npm i flatted
Run Code Online (Sandbox Code Playgroud)

但错误仍然存​​在.如何使用flatted而不是deprecated library circular-json?

Din*_*ule 4

运行以下命令来清理 NPM 缓存

npm 缓存清理 --force

运行以下命令后

npm install -g @angular/cli@latest

然后你可以创建角度项目。