| 前言 |
新建angular项目,输入ng new my-project, 后出现以下错误(my project 为项目名称)
![Unexpected end of JSON input while parsing near '[email protected]/run-sequence' Angular6 Unexpected end of JSON input while parsing near '[email protected]/run-sequence' Angular6](http://code.bmoook.com/wp-content/uploads/2023/03/20230309153817-6409fd69d3a88.png)
| 解决办法 |
1、重新建立空项目:ng new 项目名称 –skip-install
2、进入你的项目目录:cd 项目名称
3、重新设置链接:npm set registry https://registry.npmjs.org/
4、重置cache:npm cache clean –force
5、npm install yarn
6、yarn
7、如果失败重新运行:4、5、6
8、启动服务:ng serve -o
即可解决