You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using supabase/ssr in Nuxt, provided via a Nuxt module, I get the following error in the browser:
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/cookie@0.5.0/node_modules/cookie/index.js?v=d88ad7de' does not provide an export named 'parse'
It comes from packages/ssr/src/utils/helpers.ts, where cookie helper functions are imported:
export{parse,serialize}from'cookie';
Is there anything I can do about it? The issue seems to be that I'm using ssr in a ESM module, and the helper functions are CommonJS. There seem to be a pull request in the cookie library, but it's not merged yet, and ssr would still need to update the dependency.
Expected behavior
No module export error in the browser.
System information
OS: macOS
Browser: chrome, safari
Version of supabase-js: 2.39.3 (ssr 0.0.10)
Version of Node.js: v21.6.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I worked around the issue by pre-bundling the package using optimizeDeps in Vite. This fixes the error, I believe Vite fixes the imports/exports during the build.
Bug report
Describe the bug
When using supabase/ssr in Nuxt, provided via a Nuxt module, I get the following error in the browser:
It comes from
packages/ssr/src/utils/helpers.ts
, where cookie helper functions are imported:Is there anything I can do about it? The issue seems to be that I'm using ssr in a ESM module, and the helper functions are CommonJS. There seem to be a pull request in the cookie library, but it's not merged yet, and ssr would still need to update the dependency.
Expected behavior
No module export error in the browser.
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: