-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Isomorphism breaks due to Websockets when using SSR #155
Comments
I've now tried a similar minimal example using |
Perhaps https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis could be used if it's available |
@benmccann this is what I suggested and this was already released into |
We originally used globalThis in gotrue and had to polyfill it: supabase/auth-js#38 I find this a bit odd though, because our supabase-js client is isomorphic. We already use it in a node environment and it works fine 🤔 |
Anyway, this issue seems fixed by websocket@1.0.34, so at most we'd need to upgrade |
I'm not sure if it's related to the |
OK I bumped to the latest. I'll leave this open if anyone can confirm the fix? |
🎉 This issue has been resolved in version 1.11.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks! There's multiple issues left running Supabase with SvelteKit, but they're pretty clearly issues with Vite so we'll work on those in that repo. Thanks for all your help! |
Bug report
Describe the bug
When importing
createClient
into a SvelteKit project, the following error is raised:It seems to come from this block of code in the Websockets package.
To Reproduce
Expected behavior
Import should work without error
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
This was discovered after resolving #153, after which @kiwicopple recommended I create a new issue.
The text was updated successfully, but these errors were encountered: