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

[🐞] Bug while using rewrite routes pointing to the same file #6799

Open
fprl opened this issue Aug 16, 2024 · 6 comments
Open

[🐞] Bug while using rewrite routes pointing to the same file #6799

fprl opened this issue Aug 16, 2024 · 6 comments
Assignees
Labels
COMP: qwik-city STATUS-2: team is working on this Scheduled for work by the core team TYPE: bug Something isn't working

Comments

@fprl
Copy link
Contributor

fprl commented Aug 16, 2024

Which component is affected?

Qwik Runtime

Describe the bug

Hey everyone, do you know how to solve this issue when needing duplicated rewrite routes pointing to the same file? I upgraded my site to > 1.7.2 and can't build it:

More than one route has been found for pathname "..."

I thought this was already solved in [v.1.5.6](https://github.com/QwikDev/qwik/releases/
tag/v1.5.6), in fix(qwikcity): duplicated rewrite routes with multiple prefixes by @shairez in #6377.

Thank you!

Reproduction

https://github.com/fprl/qwik-duplicated-pathname-route

Steps to reproduce

npm run build and you will see the error.

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 64.39 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.0.0 - ~/.nvm/versions/node/v22.0.0/bin/node
    Yarn: 3.6.3 - /usr/local/bin/yarn
    npm: 10.5.1 - ~/.nvm/versions/node/v22.0.0/bin/npm
    pnpm: 8.12.1 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 127.0.6533.120
    Safari: 17.5
  npmPackages:
    @builder.io/qwik: ^1.8.0 => 1.8.0 
    @builder.io/qwik-city: ^1.8.0 => 1.8.0 
    typescript: 5.4.5 => 5.4.5 
    undici: * => 6.19.7 
    vite: 5.3.5 => 5.3.5

Additional Information

No response

@fprl fprl added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Aug 16, 2024
@shairez shairez added COMP: qwik-city STATUS-2: team is working on this Scheduled for work by the core team and removed STATUS-1: needs triage New issue which needs to be triaged labels Aug 19, 2024
@JerryWu1234
Copy link
Contributor

image
image

I don't why it different between DEV and PRO.
image

secondly, paths is an necessary property, I guess
image

@shairez Please help check this.

is paths in RewriteRouteOption an necessary property?

@JerryWu1234
Copy link
Contributor

the only thing left is that when paths is empty, it can run in DEV mode, but PRO can't not.
we have to make DEV and PRO behave consistently

@JerryWu1234
Copy link
Contributor

@wmertens CC

@fprl
Copy link
Contributor Author

fprl commented Aug 29, 2024

@JerryWu1234 any clue on where's the issue? I could try to solve it but if you have a hint it will be easier :)

@wmertens
Copy link
Member

I haven't really looked at the routing code yet, maybe @shairez knows

@shairez
Copy link
Contributor

shairez commented Aug 30, 2024

Thanks for checking this @JerryWu1234 !

I'll look into solving this after we'll fix the overfetching issue

@shairez shairez self-assigned this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP: qwik-city STATUS-2: team is working on this Scheduled for work by the core team TYPE: bug Something isn't working
Projects
Status: Upcoming
Development

No branches or pull requests

4 participants