D:\git\**\src\main\iui>ng build --prod --aot
Hash: 257ab60feca43633b6f7
Time: 25358ms
chunk {0} polyfills.221420fde500aaed5079.bundle.js (polyfills) 184 kB {5} [initial] [rendered]
chunk {1} scripts.92391f7b3a5602225e85.bundle.js (scripts) 185 kB {5} [initial] [rendered]
chunk {2} styles.429bdc2066b527f64acc.bundle.css (styles) 281 bytes {5} [initial] [rendered]
chunk {3} main.bfbde393948c0a677c68.bundle.js (main) 1.1 kB {4} [initial] [rendered]
chunk {4} vendor.d9800c734c7708c02954.bundle.js (vendor) 851 kB [initial] [rendered]
chunk {5} inline.d70fd8c806a11fd8fd6e.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'D:\git\**\src\main\iui\src'
@ ./src/main.ts 3:0-74
@ multi ./src/main.ts

ERROR in ./src/$$_gendir async
Module not found: Error: Can't resolve 'D:\git\**\src\main\iui\src\$$_gendir\app\upgrade\upgrade.module.ngfactory.ts' in 'D:\git\**\src\main\iui\src\$$_gendir'
@ ./src/$$_gendir async
@ ./~/@angular/core/@angular/core.es5.js
@ ./src/main.ts
@ multi ./src/main.ts

如上,执行ng build --prod --aot会报错,去掉–aot后可正常编译通过。网上查找解决方法可升级@angular/cli版本,或者执行 npm install enhanced-resolve@3.3.0 命令,本人使用第二种方法成功解决了问题,第二种不成功可升级cli后再试。

执行ng build --prod --aot命令报错的更多相关文章

  1. mac上执行sed的编辑 -i命令报错sed: 1: "test.txt": undefined label ‘est.txt’或sed: 1: "2a\test\": extra characters after \ at the end of a command

    问题一 sed编辑命令:[sed -i 's/a/b/g' test.txt]   报错:sed: 1: "test.txt": undefined label 'est.txt' ...

  2. MySQL执行外部sql脚本文件命令报错:unknown command '\'

    由于编码不一致导致的 虽然大部分导出是没有问题的 但是数据表中存储包含一些脚本(富文本内容)会出现该问题,强制指定编码即可解决. mysql导入时指定编码: mysql -u root -p --de ...

  3. angular ng build --prod 打包报错解决方案

    使用以下代码  就不报错了 ng build --prod --no-extract-license    打包命令 使用以下代码  就不报错了 ng build --prod --no-extrac ...

  4. angular2 ng build --prod 报错:Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'

    调试页面 ng serve 正常 ng build 也正常 ng build --prod 异常:Module not found: Error: Can't resolve './$$_gendir ...

  5. Angular6之ng build | ng build --aot | ng build --prod 差异

    由于写了大半年的项目终于要告一段落并且即将进行第二阶段优化开发,emmm 基础版本已经二十多个模块了,必不可少的优化是很重要的,尽管项目上使用多层嵌套懒加载,但是在首屏加载的时候,任然很慢啊,因为一直 ...

  6. ng build --aot 与 ng build --prod

    angluar的编译有以下几种方式: ng build  常规的压缩操作    代码体积最大 ng build --aot   angular预编译      代码体积较小 ng build --pr ...

  7. 安装atlas后执行hive命令报错

    在集群中安装atlas,在安装atlas的节点上执行hive -e "show databases;" 正常,但是在集群中其他节点上执行hive -e "show dat ...

  8. 执行Spark运行在yarn上的命令报错 spark-shell --master yarn-client

    1.执行Spark运行在yarn上的命令报错 spark-shell --master yarn-client,错误如下所示: // :: ERROR SparkContext: Error init ...

  9. Python3安装Celery模块后执行Celery命令报错

    1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...

随机推荐

  1. 生成0-42之间的7个不重复的int值

    public static void main(String[] args) { //set集合存储不重复无序的值 Set<Integer> set = new HashSet<In ...

  2. XML配置中 引入外部property文件

    新建properties配置文件 内容如下: jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc\:mysql\://localhost\ ...

  3. <十六>UML核心视图动态视图之状态图

    一:状态图 --->状态图显示一个状态机. --->状态机用于对模型元素的动态性进行建模.更具体地说,就是对系统行为中受事件驱动的方面进行建模. --->通常使用状态图来说明业务角色 ...

  4. 【Lintcode】036.Reverse Linked List II

    题目: Reverse a linked list from position m to n. Given m, n satisfy the following condition: 1 ≤ m ≤ ...

  5. .NETFramework-Web.Services:WebMethodAttribute

    ylbtech-.NETFramework-Web.Services:WebMethodAttribute 1.程序集 System.Web.Services, Version=4.0.0.0, Cu ...

  6. C++源码学习

    C/C++是最主要的编程语言.这里列出了50名优秀网站和网页清单,这些网站提供c/c++源代码.这份清单提供了源代码的链接以及它们的小说明.我已尽力包括最佳的C/C++源代码的网站.这不是一个完整的清 ...

  7. Polygon

    用当前的笔绘制一个由两个或多个点(顶点)连接的多边形. BOOL Polygon( LPPOINT lpPoints, int nCount ); lpPoints 指向一个指定多边形顶点的点.数组中 ...

  8. android apk 自我保护技术-完整性校验

    关于防止android apk被反编译的技术我们前面已经讲了四种. 加壳技术 运行时修改字节码 伪加密 对抗JD-GUI 如果有不明白的可以查看我的博客的前四篇中关于这四种技术的介绍.接下来我们接着介 ...

  9. day5 面向对象

    面向对象的特征 封装(encapsulation) 继承(inheritance) 多态(polymorphism) 开发的过程:其实就是不断的创建对象,使用对象,指挥对象做事情. 设计的过程:其实就 ...

  10. 【Java面试题系列】:Java基础知识常见面试题汇总 第二篇

    文中面试题从茫茫网海中精心筛选,如有错误,欢迎指正! 第一篇链接:[Java面试题系列]:Java基础知识常见面试题汇总 第一篇 1.JDK,JRE,JVM三者之间的联系和区别 你是否考虑过我们写的x ...