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
ERROR Error: Uncaught (in promise): Error: Cannot find module "./app.module".
Error: Cannot find module "./app.module".
at $_lazy_route_resource lazy namespace object:11
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:4075)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
at zone.js:872
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4066)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at $_lazy_route_resource lazy namespace object:11
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
at Object.onInvoke (core.js:4075)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
at zone.js:872
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4066)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at resolvePromise (zone.js:814)
at resolvePromise (zone.js:771)
at zone.js:873
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4066)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
The string should be the same as the one defined in lazyModules as per the summary of the implementing PR (#9515). Note that this was pre-6.0 and the configuration file name and root is slightly different.
The linked test was not properly testing the lazyModules option and is fixed in PR angular/devkit#755. Thank you for bringing the errant test to our attention.
Versions
Repro steps
I created a demo repo where I try to load the AppModule lazy
git clone https://github.com/nlx-sascha/angular-cli-lazyModules
npm i
ng serve
Observed behavior
Desired behavior
When I use the relative path in the
loader.load()
method like I would in the routerConfig (lazy) then the path could not be resolved.I found the following test in the angular devkit:
https://github.com/angular/devkit/blob/3d809ef29cf690f9d2b37fa048710132a7a9e389/packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts#L183-L206
When I try it like this it also does not work. Currently the only option is to use the same string as defined in the lazyModules. In my example
./src/app/app.module
The text was updated successfully, but these errors were encountered: