An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'

再执行启动命令ng sng serve时报错了,错误如下:
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'_第1张图片

An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
- C:\Users\master\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- C:\Users\master\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\index.js
- ..省略..

网上找了好多,都解决不了问题,最后发现@angular-devkit/build-angular这个包是在Angular 6.0中新引入的,安装即可,命令如下:

npm install -save-dev @angular-devkit/build-angular

An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'_第2张图片

开心一刻

儿子对他当局长的爸爸说:“我很喜欢对门副局长家女儿!”局长偷偷跟他说:“那是你同父异母的妹妹,只能做朋友。”儿子又说:“我也喜欢隔壁科长家的女孩!”局长又说:“那是你另一个同父异母的妹妹,千万别对你妈说。”儿子哭着对妈妈说了这些遭遇。妈妈安慰儿子:“你喜欢谁就找谁,别怕,你是市长的儿子!
An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json'_第3张图片
参考链接:
http://www.chinacion.cn/article/7791.html
http://www.voidcn.com/article/p-riferdul-btg.html

如果觉得不错,请帮忙点个赞 !!

你可能感兴趣的:(Angular6,Angular,Cli)