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

[🐞] Auth.js integration breaks routing system. useNavigate and Link components will not go to pages that import plugin@auth #7083

Closed
ShererJohn opened this issue Nov 21, 2024 · 5 comments
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@ShererJohn
Copy link

Which component is affected?

Qwik City (routing)

Describe the bug

Link components and the useNavigate function both break when going to a page that imports the auth.js integration

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

Reproduction

https://github.com/ShererJohn/qwiklab

Steps to reproduce

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

Then click the link named "Problem link"

System Info

System:
    OS: Linux 6.10 Fedora Linux 40 (Workstation Edition)
    CPU: (4) x64 Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
    Memory: 7.56 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:
    @builder.io/qwik: ^1.10.0 => 1.10.0 
    @builder.io/qwik-city: ^1.10.0 => 1.10.0 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 6.21.0 
    vite: 5.3.5 => 5.3.5

Additional Information

If this integration is not the responsibility of qwik, then it should be removed from the default list of integrations. This bug makes the entire framework unusable.

@ShererJohn ShererJohn added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Nov 21, 2024
@gioboa
Copy link
Member

gioboa commented Nov 21, 2024

Hi, thanks for your feedback. I can feel your pain but let's try to figure out a possible solution for this issue. Is it working with <a> HTML tag?

@ShererJohn
Copy link
Author

ShererJohn commented Nov 21, 2024

It is

@gioboa
Copy link
Member

gioboa commented Nov 21, 2024

It is

I searched that error and I found a thread in the nuxt repo.
Here is a possible solution

@ShererJohn
Copy link
Author

It worked, thank you!

Could you make a PR that adds this as a part of the integration?

@gioboa
Copy link
Member

gioboa commented Nov 21, 2024

Yes I will update it, I'm glad you solved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants