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

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! [email protected] 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 [email protected] 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

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

时间: 2024-08-08 17:34:52

angular ng build 报错 Cannot read property 'default' of undefined的相关文章

Chrome下使用百度地图报错Cannot read property 'minZoom' of undefined

问题:工作中在Google chome下面的js console里面测试百度地图API var map = new BMap.Map("container"); map.centerAndZoom(new BMap.Point(116.404, 39.915), 11); TypeError: Cannot read property 'minZoom' of undefined message: "Cannot read property 'minZoom' of unde

echarts报错Cannot read property 'features' of undefined

引入地图的时候 echarts2报错: Uncaught Error: [MODULE_MISS]"echarts/src/util/mapData/params" is not exists! 原因不明,但是感觉和缺js文件有关(因为echarts3报错就是因为缺少了world.js) echarts3报错: Uncaught TypeError: Cannot read property 'features' of undefined 原因如下:缺少world.js,然后成功: 完

使用vue-preview报错Cannot read property 'open' of undefined

最近在做一个vue项目中时,需要使用vue-preview插件制作缩略图,首先在终端使用npm i vue-preview -S指令安装了vue-preview插件,然后在main.js中,导入并引用: import VuePreview from 'vue-preview' Vue.use(VuePreview) 接着在需要用到vue-preview插件的组件中写入: <img class="preview-img" v-for="(item, index) in l

在使用resetField 报错Cannot read property &#39;indexOf&#39; of undefined

elementUI  的resetField  是对对整个表单进行重置,将所有字段值重置为初始值并移除校验结果 ,当内容不一致 或找不到内容时 就会报错,具体原因举例如下: 原因1:ruleForm 内部数据 与实际页面需要验证的数据不一致 比如:下面例子 页面需要的是name ,而 ruleForm定义的是name2,当单词不小心写错就会报这个问题 <el-form ref="newFormModel" :rules="rules" :model="

使用UEditor 报错Cannot read property &#39;nodeType&#39; of undefined 解决办法

报如下错误 解决办法: //对编辑器的操作最好在编辑器ready之后再做 ue.ready(function() { }) <!-- 实例化编辑器 --> <script type="text/javascript"> $(function(){ var ue = UE.getEditor("container",{ autoHeight: false }); /对编辑器的操作最好在编辑器ready之后再做 ue.ready(function

dubbo-admin-2.5.3 运行报错: Bean property &#39;URIType&#39; is not writable or has an invalid

因为 jdk 是1.8的版本,和 dubbo-admin 存在兼容性问题.所以报错: Bean property 'URIType' is not writable or has an invalid 参见:https://github.com/alibaba/dubbo/issues/50 解决方法,修改 tomcat 默认的 jdk到 1.7 : 1) 修改bin文件夹下面的catalina.bat文件,把如下内容rem ----- Execute The Requested Command

Eclipse报错:Setting property &#39;source&#39; to &#39;org.eclipse.jst.jee.server:fzxt_tj&#39; did not find

在eclipse中启动tomcat时出现Setting property 'source' to 'org.eclipse.jst.jee.server:你的站点名'   did not find a matching property错误 解决办法: 1.在server控制台内,在服务器上点右键--属性 2.general选项卡中点switch location 这时,location变为:/servers/tomcat6.0 server at localhost.server 3.在pro

vue-electron 使用sqlite3数据库,执行npm run build 报错 .NET Framework 2.0 SDK,Microsoft Visual Studio 2005[C:\temp\wechat\node_modules\sqlite3\build\binding.sln]

问题描述 vue-electron 使用sqlite3数据库,执行npm run build 报错如下: .NET Framework 2.0 SDK,Microsoft Visual Studio 2005[C:\temp\wechat\node_modules\sqlite3\build\binding.sln]Failed to execute 'C:\Program Files (x86)\nodejs\node.exe C:\Program Files (x86)\nodejs\nod

echarts js报错 Cannot read property &#39;getAttribute&#39; of null

本文将为您描述如何解决 eharts.js报错 Uncaught TypeError: Cannot read property 'getAttribute' of null 的问题 根据报错信息查找原因发现是因为 实例化 echarts 的元素不存在(未找到指定的元素),查看官方文档发现: // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('main')); 基于准备好的 dom,初始化 e