Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qwik-city's useNavigate function breaks when navigating to a page that uses the auth plugin #12269

Open
ShererJohn opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@ShererJohn
Copy link

ShererJohn commented Nov 20, 2024

Environment

  System:
    OS: Linux 6.10 Fedora Linux 40 (Workstation Edition)
    CPU: (4) x64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
    Memory: 5.31 GB / 15.48 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 22.5.1 - ~/.nvm/versions/node/v22.5.1/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.9.0 - ~/.nvm/versions/node/v22.5.1/bin/npm
    bun: 1.1.22 - ~/.bun/bin/bun
  npmPackages:
    @auth/qwik: 0.2.2 => 0.2.2 

Reproduction URL

https://github.com/ShererJohn/qwiklab

Describe the issue

Qwik's useNavigate function is used to go to pages. The Link component uses it under the hood.
When navigating to a page that imports plugin@auth it crashes

SyntaxError: The requested module '/node_modules/cookie/index.js?v=da1814f6' does not provide an export named 'parse' (at jwt.js?v=da1814f6:42:10)
  • This bug only effects navigating to pages. The functionality of the plugin is uneffected.

  • This bug presists even if you're not using the jwt session strategy

How to reproduce

git clone https://github.com/ShererJohn/qwiklab.git
cd ./qwiklab
npm i

next add these env variables

AUTH_SECRET=
AUTH_GOOGLE_ID=
AUTH_GOOGLE_SECRET=

You can change the provider if you want.
Then run npm run dev, open the index page, and then click the link named "Problem link"

Expected behavior

The Link component is supposed to go to the linked page.

@ShererJohn ShererJohn added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Nov 20, 2024
@ShererJohn ShererJohn changed the title Qwik's Link component breaks when linking to a page that uses the auth plugin Qwikcity's useNavigate function breaks when navigating to a page that uses the auth plugin Nov 21, 2024
@ShererJohn ShererJohn changed the title Qwikcity's useNavigate function breaks when navigating to a page that uses the auth plugin Qwik-city's useNavigate function breaks when navigating to a page that uses the auth plugin Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

1 participant