码迷,mamicode.com
首页 > 其他好文 > 详细

angular ng build 报错 Cannot read property 'default' of undefined

时间:2020-01-07 16:41:28      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:led   cannot   min   tps   amp   typeerror   type   deb   pack   

95% emitting index-html-webpack-plugin Cannot read property ‘default‘ of undefined
TypeError: Cannot read property ‘default‘ of undefined
at compiler.hooks.emit.tapPromise (E:\projects\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\index-html-webpack-plugin.js:82:53)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! farris-scaffold@0.0.0 pack: `ng build --base-href=/apps/fi/gl/web/balanceinit/ --aot && xcopy .\dist\* %EnvPath%\web\apps\fi\gl\web\ /Y /D /R /K /F /S && xcopy .\dist\* E:\projects\fi\gl\AccountBalance\balanceinit\web\apps\fi\gl\web\ /Y /D /R /K /F /S`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the farris-scaffold@0.0.0 pack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\wangbo03\AppData\Roaming\npm-cache\_logs\2020-01-07T07_22_03_706Z-debug.log

 

原因是node_modules 包损坏或不完整

重新安装node_modules问题解决

 

 

参考:

https://forum.radzen.com/t/typeerror-cannot-read-property-default-of-undefined/1282

angular ng build 报错 Cannot read property 'default' of undefined

标签:led   cannot   min   tps   amp   typeerror   type   deb   pack   

原文地址:https://www.cnblogs.com/wolbo/p/12161941.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!