A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/supabase/supabase-js/issues/155 below:

Isomorphism breaks due to Websockets when using SSR · Issue #155 · supabase/supabase-js · GitHub

Bug report Describe the bug

When importing createClient into a SvelteKit project, the following error is raised:

5:49:56 PM [vite] Error when evaluating SSR module /node_modules/websocket/lib/browser.js?v=f34fcf64:
Error: Could not determine global this
    at /node_modules/websocket/lib/browser.js?v=f34fcf64:7:28
    at instantiateModule (/home/ixxie/repos/minex/node_modules/vite/dist/node/chunks/dep-66eb515d.js:69030:166)

It seems to come from this block of code in the Websockets package.

To Reproduce
npm init svelte@next
npm install
npm install --save-prod @supabase/supabase-js
sed -i "s/<script>/<script>\n\timport { createClient } from '@supabase\/supabase-js';/" ./src/routes/index.svelte
npm run dev
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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4