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

basePath + rewrites breaks dynamic routes when fallback: false #40591

Closed
1 task done
nbouvrette opened this issue Sep 15, 2022 · 2 comments
Closed
1 task done

basePath + rewrites breaks dynamic routes when fallback: false #40591

nbouvrette opened this issue Sep 15, 2022 · 2 comments
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity.

Comments

@nbouvrette
Copy link
Contributor

Verify canary release

  • 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 21.6.0: Wed Aug 10 14:28:23 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T6000
Binaries:
Node: 16.17.0
npm: 8.19.1
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.3.1-canary.2
eslint-config-next: 12.3.0
react: 18.2.0
react-dom: 18.2.0

What browser are you using? (if relevant)

N/A

How are you deploying your application? (if relevant)

N/A

Describe the Bug

When using basePath + rewrites, dynamic routes will return 404 if fallback: false.

Expected Behavior

The page should work.

Link to reproduction

https://github.com/nbouvrette/basepath-rewrites-dynamic-route-issue

To Reproduce

  1. npm install
  2. npm run dev
  3. Hit: http://localhost:3000/some-path/fr-FR/ville/londres -> returns a 404
  4. in pages/city/[city].tsx change fallback: false to fallback: true
  5. Reload the page, and it should work
  6. Change back fallback: false and edit next.config.js and comment out basePath
  7. Restart the application
  8. Hit: http://localhost:3000/fr-FR/ville/londres -> works!
@nbouvrette nbouvrette added the bug Issue was opened via the bug report template. label Sep 15, 2022
@vercel-release-bot
Copy link
Collaborator

This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.

@vercel-release-bot vercel-release-bot added the stale The issue has not seen recent activity. label Jan 10, 2025
@nextjs-bot
Copy link
Collaborator

This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!

@nextjs-bot nextjs-bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity.
Projects
None yet
Development

No branches or pull requests

3 participants