Unexpected end of JSON input while parsing near '...gistry.npmjs.org/glob'

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

9、原文

猜你喜欢

转载自blog.csdn.net/ligaoming_123/article/details/82856634