AOT build fails
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.2.3
node: 6.11.1
os: darwin x64
@angular/animations: 4.3.1
@angular/common: 4.3.1
@angular/compiler: 4.3.1
@angular/core: 4.3.1
@angular/forms: 4.3.1
@angular/http: 4.3.1
@angular/platform-browser: 4.3.1
@angular/platform-browser-dynamic: 4.3.1
@angular/router: 4.3.1
@angular/cli: 1.2.3
@angular/compiler-cli: 4.3.1
@angular/language-service: 4.3.1
Repro steps.
$ ng new hello
$ cd hello
$ ng build --prod
The log given by the failure.
$ ng build --prod
Hash: edf6fb3ccb1b82fa940c
Time: 10775ms
chunk {0} polyfills.71b130084c52939ca448.bundle.js (polyfills) 177 kB {4} [initial] [rendered]
chunk {1} main.e81f19d3f6b27a436c79.bundle.js (main) 1.09 kB {3} [initial] [rendered]
chunk {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk {3} vendor.f7457d5ac1e9743fd76f.bundle.js (vendor) 849 kB [initial] [rendered]
chunk {4} inline.18e445e37a0efd4dcfa2.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 'hello/src'
@ ./src/main.ts 3:0-74
@ multi ./src/main.ts
Desired functionality.
aot build runs
Mention any other details that might be useful.
Maybe, enhanced-resolve 3.4.0 is cause. https://github.com/webpack/enhanced-resolve/issues/98
ng build --prod runs successfully after npm i [email protected] .
I noticed same problem and after npm i [email protected] I can build with AOT
Same problem here
@mchmielarski That's a very nice guess 👍
Same here.
workaround: npm install [email protected]
thanks for the solution guys, this problem just cost us the whole morning.
adding [email protected] solved it.
Thx, same here.
[email protected] solved the issue.
thanks god for this issue, i fixed this problem the whole day
Workaround with "[email protected]" seems to work on Mac OS but not on Linux!? Can anyone confirm this behavior?
works on linux ubuntu 16.04 for me
Same issue.
Guys, you should really use fixed dependency versions for Angular-Cli. It's been a millionth time when everything breaks because in new versions of sub dependencies there is something unexpected...
The angular-cli version is already fixed for us which is 1.3.1 but still we have this error.
Same issue for me. Resolved with [email protected] on Ubuntu Server.
RIP the first 2 hours of my morning.
It worked for me too with 3.3.0.
Still we have error in AOT even with 3.4.1. Also in development the environment.ts is not overwritten with the appropriate environment file
This breaks all builds, amazing fun was had today! PLZ PLZ PLZ move to fixed dependency.
Issue still exists with [email protected] here. Same issue showing up.
Staying at 3.3.0 for now.
When creating new project with fresh installed angular/cli 1.2.0 fails, too :( I used yarn for package management.
Same problem here. npm install [email protected] resolved the issue for me temporarily, but only when it's installed as an addition into an already up and running project. Deployment through a fresh install with npm install with this dependency set in package.json does not work.
This is a major bug, because it breaks a running deployment pipeline and with it the whole production setup.