新的应用程序包错误

时间:2018-06-06 10:45:31

标签: angular npm

无法使用angular cli生成新的应用程序。看起来像一个包给出错误。怎么解决这个问题?

要点:

  

npm ERR!在解析附近时,JSON输入意外结束   ' ...7瓦特\ nr0sNcY3SWENyNwkKN'

记录:

  

2213 verbose stack SyntaxError:JSON输入的意外结束时   解析附近' ... 7w \ nr0sNcY3SWENyNwkKN' 2213详细堆栈在   在parseJson中使用JSON.parse()2213详细堆栈   (d:\ PROGRAM   文件\的NodeJS \ node_modules \故宫\ node_modules \包中\ node_modules \使取入发生\ node_modules \节点取新公共管理\ node_modules \ JSON-解析,更好,错误\ index.js:7:17)   2213详细堆栈在consumeBody.call.then.buffer(D:\ Program   文件\的NodeJS \ node_modules \故宫\ node_modules \包中\ node_modules \使取入发生\ node_modules \节点取新公共管理的\ src \ body.js:96:50)   2213 verbose stack at 2213 verbose stack at   process._tickCallback(internal / process / next_tick.js:188:7)2214   verbose cwd D:\ VSCode \ helloAng 2215 verbose Windows_NT 10.0.17134 2216   详细的argv" D:\ Program Files \ nodejs \ node.exe" " d:\程序   文件\的NodeJS \ node_modules \ NPM \ BIN \ NPM-cli.js" "安装" " - 安静"   2217 verbose node v8.11.1 2218 verbose npm v5.6.0 2219错误   在解析附近时,JSON输入意外结束   ' ...7瓦特\ nr0sNcY3SWENyNwkKN' 2220详细退出[1,true]

1 个答案:

答案 0 :(得分:2)

这可能是因为缓存问题而发生的。 在命令行中运行npm cache clean --force,然后重试!