简体   繁体   中英

Angular 4 error - ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'

During the angular build for production ( ng build --prod ) I get this error:

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Applications/MAMP/htdocs/bandpay/stg-bandpay-client/src'
 @ ./src/main.ts 3:0-74
 @ multi ./src/main.ts

....

what does that mean, how to resolve that?

解决者:ng build --env = prod

Using ng build --env=prod will not reduce the build size. The file size will remain same as dev build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM