-
Notifications
You must be signed in to change notification settings - Fork 12k
Production version with angular 2.2.0 throws runtime errors during bootstrapping #3175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey guys! Same error here, when you run your solution in dev environment with "ng serve" it works properly, but when you run it in production environment with "ng serve --prod" I am getting the error message mentioned above. I am using: Thanks a lot in advance for any help provided! Regards. |
Hey, Same problem here! when deploying for production using webpack the app does not work. The data is being loaded but the view does not get updated, and getting the error provided above. Thanks for your help! |
It is angular2 bug. |
is it reported already? can you share a link? |
Yes It is reported. angular/angular#12911 |
thank you |
I am facing the same issue. |
Same here too |
Guys, try to avoid "same here" comments. The link to the real issue was given above, subscribe to that ticket in angular bugtracker and follow the changes |
2.2.1 should be out with the fix. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Ubuntu 14.04
Versions.
angular-cli: 1.0.0-beta.20-4
node: 6.2.0
os: linux x64
Repro steps.
I have fully working project created with cli and using angular 2.1.0 and angular-cli beta 20-4. But after updating to angular 2.2.0 I noticed that the prod version is broken (dev works fine). I don't use aot. Switching back to angular 2.1.2 solves the problem
The log given by the failure.
main.a82a595ec03ac1564c9b.bundle.js:1272 TypeError: Cannot read property 'appendChild' of null
at appendChild (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:949:1099)
at View_t2.visitRootNodesInternal (/t/t/component.ngfactory.js:1022:3)
at View_t2.t._renderAttach (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:1942:3886)
at View_t2.t.attachAfter (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:1942:3293)
at t.attachView (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:1949:1905)
at t.insert (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:1321:1931)
at t.createEmbeddedView (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:1321:1535)
at t.set [as ngIf] (http://localhost:4200/main.a82a595ec03ac1564c9b.bundle.js:1578:211)
at Wrapper_t.check_ngIf (/t/t/wrapper.ngfactory.js:17:23)
at proxyViewClass.View_t0.detectChangesInternal (/t/t/component.ngfactory.js:468:16)t.handleError @ main.a82a595ec03ac1564c9b.bundle.js:1272
main.a82a595ec03ac1564c9b.bundle.js:2196 TypeError: Cannot read property 'appendChild' of null(…)i @ main.a82a595ec03ac1564c9b.bundle.js:2196
Mention any other details that might be useful.
I know you would prefer a project with reproducible error but mine is rather big already and closed source, so I don't know if I'm able to provide the smallest possible code with reproducible error, but maybe you have an Idea what could have broken the prod builds in 2.2.0
The text was updated successfully, but these errors were encountered: