Supabase works with Vite but not SvelteKit dev mode
See original GitHub issueDescribe the bug
Importing Supabases’s client and refreshing the page shows an error that always looks something like…
500
ENOENT: no such file or directory, open '[project_folder]/node_modules/@supabase/supabase-js/src/index.ts'
Error: ENOENT: no such file or directory, open '[project_folder]/node_modules/@supabase/supabase-js/src/index.ts'
Building and running (npm run build
npm run start
) works fine, and the client can be used.
Have tested with a normal Vite Svelte app (npm init @vitejs/app
) and that works fine.
To Reproduce
npm init svelte@next
npm install
npm install --save @supabase/supabase-js
// index.svelte
import { createClient } from '@supabase/supabase-js'
Information about your SvelteKit Installation:
npx: installed 1 in 1.117s
System:
OS: macOS 11.2.3
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 939.37 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.4 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - /usr/local/bin/npm
Browsers:
Chrome: 89.0.4389.90
Safari: 14.0.3
npmPackages:
@sveltejs/kit: next => 1.0.0-next.59
svelte: ^3.29.0 => 3.35.0
Chrome
static
Severity
I’m probably doing something stupid here, so sorry if this is a waste of your time. But we want to build a simple-ish web app using SvelteKit and Supabase and this is stopping us.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
SvelteKit with Supabase SSR Auth Helpers
This is a localhost address where SvelteKit serves the project in development mode. This change was introduced with Vite 3. Go to Settings...
Read more >Quickstart: SvelteKit - Supabase
This example provides the steps to build a basic user management app. It includes: Supabase Database: a Postgres database for storing your user...
Read more >Sveltekit,Supabase and Vercel (problem with ... - Stack Overflow
I'm trying to set up Sveltekit, Supabase and Vercel. It works correctly on a local environment (SvelteKit and Supabase), but when I deploy ......
Read more >Introduction • Docs • SvelteKit
SvelteKit is a framework for rapid development of robust, performant web applications. ... It uses Vite with a Svelte plugin to provide a...
Read more >Deploy a Svelte site · Cloudflare Pages docs
It defaults to the GitHub repository's name, but it does not need to ... directory to .svelte-kit/cloudflare , local development has a few ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does it work if you install it as a
devDependency
? https://github.com/supabase/supabase-js/issues/89#issuecomment-809385143https://github.com/supabase/supabase-js/issues/153 was resolved but now there is also https://github.com/supabase/supabase-js/issues/155