Latest version doesn't work
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
- Create a new Nuxt 4 project:
npm create nuxt@latest <project-name> - Add the Nuxt Supabase module:
npx nuxi@latest module add supabase - Add a
.envfile withSUPABASE_URL&SUPABASE_KEYdefined - 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)
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
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 yeah, me too, just wait until the new version is stable
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
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.
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
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.jsI 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.
I think it is because it's trying to load from
src/.nuxt/imports, but the.nuxtfolder should be at the projects root folder, not insidesrc.
@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 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.
@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.