Skip to content
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

ERROR ReferenceError: DOMParser is not defined - SSR #2843

Open
oarshad opened this issue Mar 30, 2024 · 2 comments
Open

ERROR ReferenceError: DOMParser is not defined - SSR #2843

oarshad opened this issue Mar 30, 2024 · 2 comments

Comments

@oarshad
Copy link

oarshad commented Mar 30, 2024

I believe we don't have support for the SSR, as even with the latest versions I am getting few issues. Mainly when including any icons, it throws error on the server-side

ERROR ReferenceError: DOMParser is not defined

and also seeing errors like, mainly when using components like combo-box

undefined: requestAnimationFrame
undefined: cancelAnimationFrame
@Akshat55
Copy link
Contributor

Akshat55 commented Apr 4, 2024

We don't support SSR unfortunately. It hasn't been requested until now... I suspect that these requests may increase with the stable release of analogjs.

We wil need to work with the community on this one - there are quite a few components that use the browse API. For the icons, we can probably switch to Parse5.

For requestAnimationFrame user may have to create a polyfill that uses setImmediate for requestAnimationFrame 🤔

function requestAnimationFrame(f){
setImmediate( ) => f)
}

@lordememphis
Copy link

Welp! I initially thought there was a configuration I was missing, only to come here to learn there isn't SSR/SSG support yet. The application won't build in Docker, if it does it's by chance and you'd still get a couple of runtime errors. Hope this gets support soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants