supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Latest version doesn't work

Open danieldilly opened this issue 2 months ago • 10 comments

I recently updated @nuxtjs/supabase and my project stopped working. It doesn't load and I just see an error in the console (see below).

I started the project from scratch, assuming it was something with my configuration that would be resolved with a fresh start -- but ran into the same issue again.

Version

@nuxtjs/supabase: v2.0.1 nuxt: v4.2.0

Steps to reproduce

  1. Create a new Nuxt 4 project: npm create nuxt@latest <project-name>
  2. Add the Nuxt Supabase module: npx nuxi@latest module add supabase
  3. Add a .env file with SUPABASE_URL & SUPABASE_KEY defined
  4. Run the project with npm run dev

What is Expected?

No error

What is actually happening?

I receive an error in the console:

Uncaught (in promise) SyntaxError: The requested module '/_nuxt/@fs/C:/Dev/test1/node_modules/@supabase/postgrest-js/dist/cjs/index.js?v=11d44d48' does not provide an export named 'default' (at wrapper.mjs?v=11d44d48:1:8)

danieldilly avatar Oct 27 '25 19:10 danieldilly

I have the same question; it throws module '/_nuxt/node_modules/@supabase/postgrest-js/dist/cjs/index.js?v=2adfe6d6' does not provide an export named 'default' and can't revert to the old version, happening in local development

gdghanu-peter avatar Oct 28 '25 02:10 gdghanu-peter

This happened to me as well, apparently the issue is with nuxt 4.2. I downgraded back to 4.1.3 and that fixed it.

More information: https://github.com/supabase/supabase-js/issues/1804#issuecomment-3448442232

cfjohan avatar Oct 28 '25 09:10 cfjohan

@cfjohan yeah, me too, just wait until the new version is stable

gdghanu-peter avatar Oct 28 '25 09:10 gdghanu-peter

I have the same issue the module breaks my whole project, no Vue binding or directives (@click or v-model) nothing works even my nuxt dev tools stops showing up, unless i remove the supabase module from the module list everything gets back to normal and working

and i have the same setup @nuxtjs/supabase: v2.0.1 nuxt: v4.2.0

thread-koder avatar Oct 28 '25 16:10 thread-koder

This is caused by https://github.com/nuxt/nuxt/issues/33582. Once this PR will get merged the issue will be solved.

For the time being you can use the fix mentioned in this comment with Nuxt 4.2.0.

ChristopheCorbalan avatar Oct 29 '25 15:10 ChristopheCorbalan

I think I'm also experiencing this issue, my errors look like:

Cannot find module '.../src/.nuxt/imports'
Require stack:
- .../src/node_modules/@nuxtjs/supabase/dist/runtime/server/services/serverSupabaseClient.js

I have downgraded to Nuxt 4.1.3, but it hasn't fixed the issue. Maybe this is something else. But the issues started after upgrading to Nuxt 4.2.0.

carsonbird avatar Nov 04 '25 19:11 carsonbird

@carsonbird

I think I'm also experiencing this issue, my errors look like:

Cannot find module '.../src/.nuxt/imports'
Require stack:
- .../src/node_modules/@nuxtjs/supabase/dist/runtime/server/services/serverSupabaseClient.js

I have downgraded to Nuxt 4.1.3, but it hasn't fixed the issue. Maybe this is something else. But the issues started after upgrading to Nuxt 4.2.0.

I think it is because it's trying to load from src/.nuxt/imports, but the .nuxt folder should be at the projects root folder, not inside src.

ojvribeiro avatar Nov 04 '25 21:11 ojvribeiro

I think it is because it's trying to load from src/.nuxt/imports, but the .nuxt folder should be at the projects root folder, not inside src.

@ojvribeiro Thanks for the reply! But, src is my root folder. src/ contains my nuxt.config.ts, app/ and server/ folders, node_modules/, etc. It's just what I happened to name the parent folder on this project.

carsonbird avatar Nov 04 '25 21:11 carsonbird

@carsonbird have you tried ChristopheCorbalan's solution? It solved the issue for me, even on 4.2.0. Maybe you'll need to regenerate the lock file.

ojvribeiro avatar Nov 04 '25 21:11 ojvribeiro

@carsonbird have you tried ChristopheCorbalan's solution? It solved the issue for me, even on 4.2.0. Maybe you'll need to regenerate the lock file.

@ojvribeiro I've started a new project from scratch, adding in Nuxt Supabase, the issue persists.

carsonbird avatar Nov 04 '25 21:11 carsonbird