-
Notifications
You must be signed in to change notification settings - Fork 482
Server side error. Promise uncaught? #1063
Comments
so i saw this comment: #741 (comment) and enabled source maps. and the issue has magically disappeared. so whoop whoop. This isn't in the docs or anything so i could't find any info anywhere. but yeah issue solved :) |
Still looking to solve this, tried enabling the sourcemaps, to no avail unfortunatly |
Hi .. same problem here .. Angular 7 + UNIVERSAL ... same error |
could you post a little more info? preferably your angular.json, what version are you using, server.ts? |
Hi .. sorry for delay .. Here are my files: ============================================ ============================================{
|
Can you try putting outputHashing to "all" and changing vendorChunks to false in angular.json. not sure but i think the unresolved promise error is something to do with the server failing to get the lazyloaded module on the server. |
Hi .. I've just tried to outputHashing to "all" .. ok now i try to change vendorChunks .. and sorry for the typo .. but in the app.module.ts THERE IS BrowserModule.withServerTransition({ appId: 'serverApp' }), THNX!!! ;) |
Hi .. new update .. now it works perfect .. the prob (i think) was related to the Lazy loaded Routes ... there were NO 'normal' route (ALL routes were lazy loaded) .. now we have one deafult eager route/component ..and it looks ok ... THNX for you support!!!! |
Hi @freefred81 please can you let me know, what change have you performed to make this work? |
Hi Brune ... it's a long time from this post ..and a loto of version of angular has passed .... BUT from what i remember my problem was: In my project there were not 1 normal root (not lazy loaded) ..all root were lazy loaded ... try to change the first rott (your default root) to a normal one |
Hi @freefred81 yeah! The first thing I've tried was revert the routes to it's initial state but in my case wasn't work, I had to revert the entire app.module and it started to work again, anyway, I'll review one by one my modules in order to find the culprit. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report
What is the expected behavior?
server side to execute http requests and render lazy loaded modules as expected...
i've gone through all my http promises and caught them but the line number references seem
very early on in server.js which is angular code? anyone know whats going on?
server side throws error shown bellow then the client is sent and rendered normally on the client with no errors.
main.ts
server.ts
it may have something to do with lazy loading?
What modules are related to this issue?
Environment:
@nguniversal versions
Windows (10)
The text was updated successfully, but these errors were encountered: