supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Brand new project gets "SyntaxError: Importing binding name 'parse' is not found."

Open gouwsxander opened this issue 9 months ago • 11 comments

Hi, I've been trying to use this module and keep getting this error. I even tried creating a new Nuxt project to see if there was some kind of installation error with anything else and I've narrowed it down to this module.

  1. I run npm create nuxt project-name (with no other modules) then cd into my project.
  2. Next I run npm install and npx nuxi@latest module add supabase. This automatically adds @nuxtjs/supabase into my modules.
  3. I then add my credentials to my .env.

At this point, if I try to run npm run dev I get SyntaxError: Importing binding name 'parse' is not found in my console. Any suggestions?

Thank you.

gouwsxander avatar Apr 17 '25 04:04 gouwsxander

adding this to my package.json fixed it for now

"overrides": { "cookie": "1.0.2" }

ayushpatel1001 avatar Apr 17 '25 11:04 ayushpatel1001

Thank you! Seems to be working. Out of curiosity, how did you figure this out?

I guess I'll leave this issue open until there's a long-term fix? Or if this is the long-term fix perhaps it should be mentioned somewhere in the docs.

gouwsxander avatar Apr 18 '25 20:04 gouwsxander

Thank you! Seems to be working. Out of curiosity, how did you figure this out?

I guess I'll leave this issue open until there's a long-term fix? Or if this is the long-term fix perhaps it should be mentioned somewhere in the docs.

found it here: https://github.com/supabase/ssr/issues/62

ayushpatel1001 avatar Apr 19 '25 10:04 ayushpatel1001

Getting this issue too

Rolanddoda avatar Apr 27 '25 13:04 Rolanddoda

Same!

devloos avatar May 10 '25 23:05 devloos

adding this to my package.json fixed it for now

"overrides": { "cookie": "1.0.2" }

This did not work for me. This is in browser console:

Uncaught (in promise) SyntaxError: The requested module '/_nuxt/@fs/.../node_modules/cookie/dist/index.js?v=ead4a1e2' does not provide an export named 'parse' (at helpers.js?v=ead4a1e2:1:10)

gnp avatar Nov 03 '25 19:11 gnp

@gnp Are you using Nuxt v4.2? Try downgrading to Nuxt v4.1.3.

See my comment on the supabase/ssr issue linked above by @ayushpatel1001 for more details.

I was encountering this error after upgrading from Nuxt v3 to Nuxt v4. None of the workarounds here worked, but after realizing @supabase/postgres-js was throwing similar errors, I found https://github.com/supabase/supabase-js/issues/1804. Essentially, Nuxt v4.2 can cause this error, but downgrading to Nuxt v4.1.3 fixes it.

While spending many hours debugging this, I was able to fix this specific error by patching @supabase/ssr using pnpm patch. While this didn't end up being needed once I downgraded the Nuxt v4.1.3, I've put my specific changes into a gist in case it helps anyone else.

joepaolicelli avatar Nov 03 '25 19:11 joepaolicelli

@joepaolicelli My current setup uses

    "@nuxtjs/supabase": "^1.6.1",
    "nuxt": "^4.1.1",

and still exhibits the problem. I moved back from 2.x on supabase module because the release notes of 2.0.0 indicate breaking changes and JWT token stuff and I'm using "legacy" settings in Supabase itself that comes out of the box.

gnp avatar Nov 03 '25 21:11 gnp