昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期五, 四月 06, 2018

ng build --prod not working

Error:




The code is generated using ng new command, not modified.

ng build works well.


The reason is that the package file generated with ng new is not using some old version libraries that are not compatible with aot option. (aot option is implicit with --prod)

To fix this issue

npm install -g npm-check-updates
ncu -u 
npm install


Then build again

 ng build --prod -aot --base-href=/tools/angular/

Problem solved 





--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.