当前位置:网站首页>Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
2022-07-02 06:25:00 【android_Mr_夏】
简介
在创建angular项目的时候,打包生成dist文件出现下列错误:
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'D:\web\task\src' @ ./src/main.ts 3:0-74 @ multi ./src/main.ts解决方案:
把ng build –prod替换成ng build –env=prod,接下来就会编译成功。
原因:这并不是建立在aot的基础之上的,ng build –env = prod:用environment.prod.ts替换environment.ts,但它是一个简单的ng build。ng build –prod:使用aot + environment.prod.ts替换的改进版本(之前,它是ng build –prod –aot)
边栏推荐
- DNS attack details
- Underlying mechanism mvcc
- SQLI-LABS通關(less6-less14)
- php中的数字金额转换大写数字
- Differences between ts and JS
- Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
- Data warehouse model fact table model design
- SQLI-LABS通关(less2-less5)
- Oracle EBS database monitoring -zabbix+zabbix-agent2+orabbix
- TCP攻击
猜你喜欢
随机推荐
Principle analysis of spark
CAD二次开发 对象
js把一个数组分割成每三个一组
MySQL中的正则表达式
Yolov5 practice: teach object detection by hand
Redis -- cache breakdown, penetration, avalanche
2021-07-17c /cad secondary development creation circle (5)
类加载器及双亲委派机制
@Transational踩坑
Oracle EBS数据库监控-Zabbix+zabbix-agent2+orabbix
Laravel8中的find_in_set、upsert的使用方法
js判断对象是否为空
Date time API details
Queue (linear structure)
sqli-labs通关汇总-page4
Sqli-labs customs clearance (less18-less20)
In depth study of JVM bottom layer (3): garbage collector and memory allocation strategy
Uniapp introduces local fonts
ARP攻击
oracle EBS标准表的后缀解释说明









