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 Reproducenpm 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
ScreenshotsIf applicable, add screenshots to help explain your problem.
System informationThis 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