Repository navigation
Closed
Description
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x)
- [ ] new
- [x] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Angular CLI: 7.2.0-rc.0
Node: 11.0.0
OS: win32 x64
Angular: 7.2.0-rc.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.12.0-rc.0
@angular-devkit/build-angular 0.12.0-rc.0
@angular-devkit/build-optimizer 0.12.0-rc.0
@angular-devkit/build-webpack 0.12.0-rc.0
@angular-devkit/core 7.2.0-rc.0
@angular-devkit/schematics 7.2.0-rc.0
@ngtools/webpack 7.2.0-rc.0
@schematics/angular 7.2.0-rc.0
@schematics/update 0.12.0-rc.0
rxjs 6.3.3
typescript 3.2.2
webpack 4.23.1
Repro steps
When using ngtsc, together with the usual platformBrowserDynamic bootstrapping code causes a runtime error.
git clone https://github.com/alan-agius4/ivy-build-optimizer-issue.git
npm i
node_modules\.bin\ivy-ngcc
ng serve --prod
The log given by the failure
Runtime error
main.ts:12 Error: No ErrorHandler. Is platform module (BrowserModule) included?
at core.js.pre-build-optimizer.js:17333
at n.invoke (zone.js.pre-build-optimizer.js:388)
at Object.onInvoke (core.js.pre-build-optimizer.js:16856)
at n.invoke (zone.js.pre-build-optimizer.js:387)
at t.run (zone.js.pre-build-optimizer.js:138)
at t.run (core.js.pre-build-optimizer.js:16770)
at t.bootstrapModuleFactory (core.js.pre-build-optimizer.js:17328)
at core.js.pre-build-optimizer.js:17368
at n.invoke (zone.js.pre-build-optimizer.js:388)
at t.run (zone.js.pre-build-optimizer.js:138)
Desired functionality
No Error.
Mention any other details that might be useful
When turning off BuildOptimizer there are no runtime errors.
Activity
alan-agius4 commentedon Dec 21, 2018
The root cause seems to be caused by scrub file transformer in build optimizer.
Will continue looking into it in the coming days
alan-agius4 commentedon Dec 27, 2018
Blocked by angular/angular#27841
alan-agius4 commentedon Jan 8, 2019
Closing as this issue is from the compiler and there is a fix for it angular/angular#27848
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.