Angular 我得到一个错误;在';附近进行分析时出现JSON输入意外结束错误&引用;“依赖项”:试图还原节点模块时{“tsli';”

Angular 我得到一个错误;在';附近进行分析时出现JSON输入意外结束错误&引用;“依赖项”:试图还原节点模块时{“tsli';”,angular,node-modules,Angular,Node Modules,尝试安装节点模块时出现以下错误 2582 verbose node v12.16.1 2583 verbose npm v6.13.4 2584 error Unexpected end of JSON input while parsing near '..."dependencies":{"tsli' 2585 verbose exit [ 1, true ] 当试图安装节点模块时,如果在..附近解析时出现标题为错误的JSON输入意外结束,我们可以尝试下面的解决方案来解决 在命令窗口类型

尝试安装节点模块时出现以下错误

2582 verbose node v12.16.1
2583 verbose npm  v6.13.4
2584 error Unexpected end of JSON input while parsing near '..."dependencies":{"tsli'
2585 verbose exit [ 1, true ]

当试图安装节点模块时,如果在..附近解析时出现标题为错误的JSON输入意外结束,我们可以尝试下面的解决方案来解决

在命令窗口类型中

  • npm缓存清理--强制执行

  • npm安装-g@angular/cli(它将安装/更新您的angular cli)

  • 然后再次尝试从Package.Json或通过CLI命令“ng new YourProjectName”还原节点moduels

    作为参考,请找到此