当前位置:网站首页>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)
边栏推荐
- 2021-07-05C#/CAD二次开发创建圆弧(4)
- Basic knowledge of software testing
- 搭建frp进行内网穿透
- JS judge whether the object is empty
- Sqli-labs customs clearance (less18-less20)
- Flex Jiugongge layout
- Oracle RMAN automatic recovery script (migration of production data to test)
- Message queue fnd in Oracle EBS_ msg_ pub、fnd_ Application of message in pl/sql
- js判断对象是否为空
- php中计算树状结构数据中的合计
猜你喜欢
In depth study of JVM bottom layer (II): hotspot virtual machine object
SQLI-LABS通关(less2-less5)
Principle analysis of spark
PHP Session原理简析
[Zhang San learns C language] - deeply understand data storage
Oracle EBS数据库监控-Zabbix+zabbix-agent2+orabbix
解决微信小程序swiper组件bindchange事件抖动问题
In depth study of JVM bottom layer (IV): class file structure
Sqli labs customs clearance summary-page2
ssm人事管理系统
随机推荐
php中的数字金额转换大写数字
js判断对象是否为空
Ingress Controller 0.47.0的Yaml文件
SQLI-LABS通关(less6-less14)
Redis -- cache breakdown, penetration, avalanche
Solve the problem of bindchange event jitter of swiper component of wechat applet
JS delete the last bit of the string
Oracle apex Ajax process + dy verification
IDEA2020中PySpark的两表关联(字段名相同)
Message queue fnd in Oracle EBS_ msg_ pub、fnd_ Application of message in pl/sql
中年人的认知科普
ORACLE EBS DATAGUARD 搭建
Go package name
oracle EBS标准表的后缀解释说明
[daily question] - Huawei machine test 01
Explanation of suffix of Oracle EBS standard table
@Transational踩坑
Oracle段顾问、怎么处理行链接行迁移、降低高水位
Oracle rman半自动恢复脚本-restore阶段
CSRF攻击