rangle / angular-ssr

Angular 4+ server-side rendering solution compatible with @angular/material, jQuery, and other libraries that touch the DOM (as well as providing a rich feature set!)
BSD 2-Clause "Simplified" License
279 stars 38 forks source link

Unable to build with lazyloaded modules #56

Open wnabil opened 7 years ago

wnabil commented 7 years ago

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.

tamascsaba commented 7 years ago

:+1: for me

wnabil commented 7 years ago

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.

SwamyKottur commented 7 years ago

I am having similar problem when my route ts has loadChildren

acb2jose commented 7 years ago

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....