angular - 无法读取未定义的属性(读取 emod)
问题描述
我在 github 存储库中有一个带有自定义组件的 Ang12 项目,我正在尝试在另一个项目中使用它,但在运行时出现以下错误:无法读取未定义的属性(读取 emod)。npm i git@github:.../house-building.git 和 ng build,serve 工作正常,但是当我在当前项目中使用来自 git 的组件时出现此错误:my-current-project.html:
<house-building></house-building>
有没有人试图这样做并有这个错误?
解决方案
我遇到了同样的问题。目前,我必须使用生产配置来解决这个问题。如果您有完美的解决方案,请告诉我。
这是我的解决方案:
在angular.json
设置optimization
为true
"development": {
"buildOptimizer": false,
"optimization": true, // resolve the problem of (reading emod)
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
推荐阅读
- javascript - 无法使用 Firebase 谷歌云功能发送电子邮件
- google-apps-script - 以编程方式发送 Google 表单的最直接方式
- python - 多条件重复过滤器(可能丢弃)Pandas DataFrame Python
- python - 如何将返回多个字段的函数调用的输出作为新列添加/插入到 Pandas 数据框中?
- excel - 使用 Range.Characters 属性从 VBA 中 UDF 的返回值更改字体
- json - 如何在另一个 JObject 中为动态 JObject 循环?
- matlab - 求解整数解的线性方程组
- java - 生成jar文件intellij idea
- python - AttributeError: 'DataFrame' 对象没有属性 'raw_ratings' ,拆分 DataFrame 时
- android - 从没有接口的 RecyclerViewAdapter 开始片段