You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding RouterModule breaks Ivy apps using platformBrowserDynamic #27794
When adding the RouterModule and use ngtsc, together with the usual platformBrowserDynamic bootstrapping code causes a runtime error.
🔬 Minimal Reproduction
git clone https://github.com/alan-agius4/ivy-router-issue.git
npm i
node_modules\.bin\ivy-ngcc
ng serve --prod
🔥 Exception or Error
Runtime error:
core.js:15268 ERROR TypeError: Cannot read property '__source' of undefined
at t.get (core.js:8532)
at t.get (core.js:8894)
at core.js:1207
at Ne (core.js:1207)
at Object.t_Factory [as factory] (ngInjectableDef.js:8)
at t.hydrate (core.js:9017)
at t.get (core.js:8888)
at core.js:1207
at Ne (core.js:1207)
at Fe (core.js:1264)
Anything else relevant?
At first glace, it doesn't look like this is a CLI issue as disabling Optimizations and Build Optimizer, yields the same result.
Looks like ngcc issue since it can't transform _decorate statement from Location to Location.ngInjectableDef due to the fact that Location class contains static methods that result in
Activity
alexzuza commentedon Jan 1, 2019
Looks like ngcc issue since it can't transform
_decoratestatement fromLocationtoLocation.ngInjectableDefdue to the fact thatLocationclass contains static methods that result infesm5/common.js
And ngcc compiler is trying to recognize it as follows:
Update:
Apparently @petebacondarwin has already caught similar problem here #27841 (comment)
Update 2:
Forgot to mention that we can still be able to start ivy application with
RouterModule.For that we have to either:
polifills.tses5toes2015intsconfig.jsonUpdate 3:
Should be fixed by #27848
angular-automatic-lock-bot commentedon Sep 14, 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.