1. 重新建立空项目:ng new 项目名称 --skip-install
  2. 进入你的项目目录:cd 项目名称
  3. 重新设置链接:npm set registry https://registry.npmjs.org/
  4. 重置cache:npm cache clean --force
  5. 安装模块包:npm install
  6. 如果失败重新运行:4、5
  7. 启动服务:ng serve
  8. 测试网页:打开浏览器,输入http://localhost:4200

ng new 创建新项目时报错 verbose stack SyntaxError: Unexpected end of JSON input while parsing near 的解决方法

见到此图,恭喜你成功了。

切记不要使用淘宝的链接,会报无数个解析JSON的错误。


相关文章:

  • 2022-02-10
  • 2021-11-17
  • 2021-08-25
  • 2021-12-19
  • 2022-01-09
  • 2021-09-30
  • 2021-07-15
  • 2021-12-10
猜你喜欢
  • 2021-08-28
  • 2021-06-26
  • 2021-12-03
  • 2021-11-03
  • 2021-09-14
  • 2022-01-07
  • 2021-08-08
相关资源
相似解决方案