next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Client routing not working for subpages with dynamic param.

Open thomkrupa opened this issue 2 years ago • 0 comments

Verify canary release

  • [X] I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 Binaries: Node: 16.15.1 npm: 8.6.0 Yarn: 1.22.19 pnpm: 6.11.0 Relevant packages: next: 13.0.1-canary.4 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

Client routing does not work if I get a dynamic param in a subfolder. In the console, you can see 404 errors. After clicking on a link the whole page reloads.

Expected Behavior

No 404s in console and no reloading on a nav click.the

Link to reproduction

https://next13-subpages-bug.vercel.app/ssr

To Reproduce

If you go to https://next13-subpages-bug.vercel.app/ssr you can see 404s in the console.

If you click on SSR Page 1, everything works as expected. If you click on SSR sub Page 1, the page reloads.

Repo: https://github.com/thomkrupa/next13-subpages-bug

It works as expected in dev mode, but it doesn't work on Vercel.

thomkrupa avatar Nov 01 '22 21:11 thomkrupa