Angular build Error:In this configuration Angular requires Zone.js

Angular cli 运行 build后打开生成的index.html报错:In this configuration Angular requires Zone.js

生成代码如下:

ng build --port

错误:

Error: In this configuration Angular requires Zone.js

解决方法:(缺少zone.js包的引用,增加zone.js包的依赖就好了)

npm install --save zone.js

 

posted @ 2018-06-06 02:02  eedc  阅读(2925)  评论(0编辑  收藏  举报