-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Ionic / Angular Universal Prerender bugs on MutationObserver
#21063
Comments
@mhartington please help me continue this issue here since the other issue was closed by author. Thank you very much for everything. |
Looks like the issue is coming from here: https://github.com/ionic-team/ionic/blob/a5229d90ca2a608e8bf4db0c8f71c86d481dd649/core/src/utils/watch-options.ts#L1 |
Thanks @liamdebeasi. |
Can you try the following dev build and let me know if it resolves the issue?
|
Hey @rgolea , Sorry but I don't recall Ionic having SSR-related stuff. Can you point them to me or can you explain me how did you integrate SSR into your project? |
@NikolaPeevski please check the example github project link I gave when opening the issue. |
@liamdebeasi will do! Thank you! Will get back to you as soon as possible. |
@rgolea I looked at it, just curious did you build the SSR yourself or did you follow a guide, my ssr looked way different, it had some handlings about mocking the browser on the backend. |
@NikolaPeevski not really. Just added IonicAngularServer and the SSR Express schematics. |
@rgolea Oh neat, the one I did was with native angular express engine. Lmk if this fixes the issue, I am also interested in SSR with ioonic. |
@liamdebeasi this build fixes that issue but a new one appears:
This seems to come from here: |
@rgolea That looks like an SSR issue in Swiper not in Ionic. We are updating to Swiper 5 in an upcoming version of Ionic Framework, so the issue might be fixed there. |
@liamdebeasi will that happen soon? I will be happy to test. Also, maybe swiper can get imported only if it’s not in prerender? |
Hmm actually it looks like the dev I gave you already had Swiper 5 in it. Is your app using |
Swiper always gets imported. I do, however, have slides in my app. But it doesn't compile the test app I gave a link in the description of the issue because of it. |
@liamdebeasi what can I do to help? |
@rgolea You do not need to keep asking for updates every few days. We will post an update when we have more to share. |
I am so sorry @mhartington. I will try not to. Thanks a lot! |
Thanks @liamdebeasi. New issue is #21138. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[x] 5.x
Current behavior:
The SSR prerender does not render properly. There is a problem with
MutationObserver
not existing on node and it's being used inside theion-select
.Expected behavior:
It should allow to prerender the html files for the templates that contain
ion-select
to be prerendered.Steps to reproduce:
I got to reproduce this error by just adding a
ion-select
to the page. It happens when runningnpm run prerender
directly from the@nguniversal/express-engine
schematics and the template has anion-select
.Related code:
A sample application via GitHub
https://github.com/rgolea/ionic-ssr-errors
Other information:
This is a continuation of the #21001 since the author closed it.
Ionic info:
Errors:
The text was updated successfully, but these errors were encountered: