rangle/angular-ssr

Unable to build with lazyloaded modules

wnabil opened this issue · 4 comments

I found no errors at all when i try to run my application without the lazyloaded modules.
but when i enable them inside the app routes i got webpack error message :
[error] Fatal exception encountered: Error: Cannot find a webpack chunk with the name ./test/test.module 0l [error] Failed to render application: Error: Fatal renderer exception: Error: Cannot find a webpack chunk with the name ./test/test.module at SafeSubscriber._error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/angular-ssr/source/application/builder/prerenderer.ts:26:20) at SafeSubscriber.__tryOrUnsub (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:254:10) at SafeSubscriber.error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:216:16) at Subscriber._error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:139:22) at Subscriber.error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:109:12) at SafeSubscriber.__tryOrUnsub (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:254:10) at SafeSubscriber.error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:216:16) at Subscriber._error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:139:22) at Subscriber.error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subscriber.ts:109:12) at ReplaySubject.Subject.error (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/rxjs/src/Subject.ts:77:15) at ApplicationImpl.<anonymous> (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/angular-ssr/source/application/builder/impl/application.ts:82: 19) at step (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/angular-ssr/build/application/builder/impl/application.js:31:23) at Object.throw (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/angular-ssr/build/application/builder/impl/application.js:12:53) at rejected (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/angular-ssr/build/application/builder/impl/application.js:4:65) at ZoneDelegate.invoke (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/zone.js/dist/zone-node.js:391:26) at Zone.run (/home/orange/Desktop/projects/maker/angular-ssr/examples/cli/node_modules/zone.js/dist/zone-node.js:141:43) 0l
i am trying on the cli example and you can find an example here
https://github.com/wnabil/angular_universal_cli_lazyload
the normal serve is working fine
only the ng-render giving this error.
Sorry for bad English.

👍 for me

i am not using the cli version right now as i tested the express and it works.
but maybe this will be fixed when they notice it.

I am having similar problem when my route ts has loadChildren

i have the same problem...my app work good without lazy loading but not work with it and i think that it is very important.
If somebody have the solution for that, please share it
thank....