Skip to content

cookie/index.js does not provide an export named 'parse' helpers.js #62

Closed as not planned

Description

@phillipmohr

Bug report

  • [ X] I confirm this is a bug with Supabase, not with my own application.
  • [ X] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Getting Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/[email protected]/node_modules/cookie/index.js?v=1eda2991' does not provide an export named 'parse' (at helpers.js?v=1eda2991:1:10) in my Nuxt application.

File location where error is thrown: http://localhost:3000/_nuxt/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@supabase/ssr/dist/module/utils/helpers.js?v=1eda2991

A clear and concise description of what the bug is.
See error message.

I had this issue before and I think I fixed it by manually editing the node_modules and change this line:
import {parse as cookieParse, serialize as cookieSerialize} from "/_nuxt/node_modules/.pnpm/[email protected]/node_modules/cookie/index.js?v=1eda2991"; to this

const { parse: cookieParse, serialize: cookieSerialize } = require("cookie");

Since then I have forgot about it. Now it's happening again because it was just a temp local fix.

I wanted to retry if editing the helpers.js in the node_modules would fix it again but now for some reason my changes in the node modules are not being applied. I have spent countless hours into figuring out why.

So unfortunately as of now this is all the information I can give you about this bug. Maybe someone else experiences the same issue.

I'm using the @nuxtjs/supabase module.

System information

  • OS: macOS
  • Browser (if applies) Google Chrome
  • Version of supabase-js: 2.39.0
  • Version of Node.js: v22.2.0
    -Version of @nuxtjs/supabase: 1.1.6

Activity

  1. added
    bug
    on Sep 6, 2024
  2. j4crev commented on Sep 6, 2024

    @j4crev
    Contributor

    I believe you'll want to open an issue on their repo, as that library is not part of Supabase.
    https://github.com/nuxt-modules/supabase/issues

  3. phillipmohr commented on Sep 6, 2024

    @phillipmohr
    Author

    I believe you'll want to open an issue on their repo, as that library is not part of Supabase. https://github.com/nuxt-modules/supabase/issues

    Sorry I forgot to mention that the error occurs in http://localhost:3000/_nuxt/node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@supabase/ssr/dist/module/utils/helpers.js?v=1eda2991 which is this library, right?

  4. j4crev commented on Sep 6, 2024

    @j4crev
    Contributor

    Ah, yes.

    To clarify, are you importing parse or serialize into your code?

  5. phillipmohr commented on Sep 6, 2024

    @phillipmohr
    Author

    Ah, yes.

    To clarify, are you importing parse or serialize into your code?

    No, I'm not importing parse or serialize.

  6. lihbr commented on Jan 2, 2025

    @lihbr

    Just sharing a workaround here in the meantime while waiting for v6:

    Workaround

    1. Override the cookie version in package.json cause multiple versions are causing conflicts:
    "resolutions": {
      "cookie": "0.7.2"
    }
    

    This workaround should resolve the issue.

  7. L422Y commented on Mar 7, 2025

    @L422Y

    Just battled a while with this... even with the workaround above, it didn't work...

    Eventually I got around to removing dependencies and as soon as I removed socket.io I stopped getting the error... maybe this will help someone else.

  8. MachariaK commented on Mar 12, 2025

    @MachariaK

    Just battled a while with this... even with the workaround above, it didn't work...

    Eventually I got around to removing dependencies and as soon as I removed socket.io I stopped getting the error... maybe this will help someone else.

    The workaround works. After adding it, you have to delete the node_modules directory and lock files (package-lock.json or yarn.lock), then reinstall your dependencies.

  9. L422Y commented on Mar 12, 2025

    @L422Y

    The workaround works.

    It did not for me. I ran rm -rf .nuxt .output node_modules pnpm-lock.yaml && pnpm i and still got the same error on 0.7.2

  10. fanckush commented on Mar 13, 2025

    @fanckush

    also having this issue

  11. BinaryShrub commented on Mar 14, 2025

    @BinaryShrub

    brand new project, running into this too, suggested workaround is not effective

  12. BinaryShrub commented on Mar 14, 2025

    @BinaryShrub

    possibly related to this change? 9524528

    I noticed they upgraded cookie and removed parse from one of the files but not helper?

  13. BinaryShrub commented on Mar 14, 2025

    @BinaryShrub

    forcing an update to 1.0.2 in my deno.lock and cleaning node_modules was my workaround

        "@supabase/[email protected]_@[email protected]": {
          "integrity": "sha512-n3plRhr2Bs8Xun1o4S3k1CDv17iH5QY9YcoEvXX3bxV1/5XSasA0mNXYycFmADIdtdE6BG9MRjP5CGIs8qxC8A==",
          "dependencies": [
            "@supabase/supabase-js",
            "@types/cookie",
            "[email protected]"
          ]
        },
    
  14. guillaumeboussion commented on Mar 18, 2025

    @guillaumeboussion

    If ever some of you encounter this problem, you might also encounter issues with devtools, that will not work due to this issue. Because of this, I spent 2 entire days trying to get what's wrong

    Thanks @lihbr for the workaround

  15. 9 remaining items

  16. j4crev commented on Apr 9, 2025

    @j4crev
    Contributor

    To my knowledge, no one is working on this; but comms can be inconsistent and they are working on it but just don't mention it.

    Is it safe to say that this only affects Nuxt users?

    @Dino-Kupinic @abeldotam @herifanantenana @gregorylocigno @piyushdolar @sanyukta-09 @guillaumeboussion @BinaryShrub @fanckush @L422Y @MachariaK @lihbr @phillipmohr

  17. lihbr commented on Apr 10, 2025

    @lihbr

    I think this only affects Nuxt yes, not really sure as to why, but maybe we can work on a fix at the Nuxt module level in the meantime.

  18. piyushdolar commented on Apr 10, 2025

    @piyushdolar

    @j4w8n Yes, for sure only affecting the nuxt3 users, Because under the hood it's using cookie.js which is not compatible

  19. gabrielstuff commented on Apr 11, 2025

    @gabrielstuff

    Nuxt does not depend on cookie.js. It relies on cookie-es https://github.com/nuxt/nuxt/blob/v3.16.2/packages/nuxt/src/app/composables/cookie.ts#L3 -> https://github.com/unjs/cookie-es which is a custom implementation based on cookie.js

    The issue might live in the way @supabase/ssr import the pacakge. Using the solution :

    "resolutions": {
    	"cookie": "0.7.2"
    }
    

    does work for us.

  20. vspin commented on Apr 20, 2025

    @vspin

    It went away after I upgraded to Node v22.14.0 (LTS).

  21. joepaolicelli commented on Oct 30, 2025

    @joepaolicelli

    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 this issue on that repo. Essentially, Nuxt v4.2 can cause this error, but downgrading to Nuxt v4.1.3 fixes it. (EDIT: This has now been fixed in Nuxt v4.2.1, and appears to work fine for me.)

    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.

  22. Adamatt commented on Oct 31, 2025

    @Adamatt

    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 this issue on that repo. 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.

    This is the only fix that worked for me after upgrading Nuxt v3 to v4.

  23. leopoldkristjansson commented on Nov 1, 2025

    @leopoldkristjansson

    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 this issue on that repo. 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.

    This is the only fix that worked for me after upgrading Nuxt v3 to v4.

    Same here. Downgrade from 4.2.0 to 4.1.3 seems to make the issue go away.

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

    {
      "private": true,
      "scripts": {
        ...
      },
      "devDependencies": {
        "@nuxtjs/prismic": "^4.1.0",
        "eslint": "^9.39.0",
        "nuxt": "4.1.3", // Downgrade to 4.1.3 works, 4.2.0 has issues.
        "nuxt-security": "^2.4.0",
        "nuxt-shiki": "^0.3.1",
        "prettier": "^3.6.2",
        "prismic-ts-codegen": "^0.1.28"
      },
      "dependencies": {
        "@nuxt/eslint": "^1.10.0",
        "@nuxt/eslint-config": "^1.10.0",
        "@nuxtjs/critters": "^0.9.0",
        "@nuxtjs/supabase": "^2.0.1",
        "@prismicio/helpers": "^2.3.9",
        "@vueuse/core": "^14.0.0",
        "@vueuse/nuxt": "^14.0.0",
        "less": "^4.4.2",
        "lettermint": "^1.4.0",
        ...
      }
    }
    
  24. Psycarlo commented on Feb 19, 2026

    @Psycarlo

    Facing same issue. I'm using:

    bun
    nuxt ^4.3.1
    @nuxtjs/supabase ^2.0.3

  25. lmoy28 commented on Mar 13, 2026

    @lmoy28

    Same issue here with :

    nuxt 4.4.2
    @nuxtjs/supabase 2.0.4

    is there a fix planned for this ?

    I have been getting this glitch on and off for the last year now...

  26. ojvribeiro commented on Mar 13, 2026

    @ojvribeiro

    @lmoy28

    This worked beautifully for me using Nuxt Layers: #137 (comment)

    No need for resolutions or overrides.

  27. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has not had any activity for 6 months.
    It will be closed in 30 days if no further activity occurs.

    If this is still relevant, please comment to keep it open.

  28. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

    Closed due to inactivity. Please open a new issue if this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions