Brand new project gets "SyntaxError: Importing binding name 'parse' is not found."
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.
- I run
npm create nuxt project-name(with no other modules) then cd into my project. - Next I run
npm installandnpx nuxi@latest module add supabase. This automatically adds@nuxtjs/supabaseinto my modules. - 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.
adding this to my package.json fixed it for now
"overrides": { "cookie": "1.0.2" }
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.
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
Getting this issue too
Same!
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 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 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.