-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Closed
Closed
Copy link
Labels
Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.Related to Next.js linking (e.g., <Link>) and navigation.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.locked
Description
Link to the code that reproduces this issue
https://github.com/wlechowicz/next14-catchall-repro
To Reproduce
Caused by #58215, see #58215 (comment)
- Start the application with
npm run dev
- Observe the error:
○ Compiling / ...
⨯ app\page.tsx
You cannot have two parallel pages that resolve to the same path. Please check /page and /[lang]/@modal/[...catchAll]/page. Refer to the route group docs for more information: https://nextjs.org/docs/app/building-your-application/routing/route-groups
- If the
@modal
,foo
andbar
are moved up to the app root (outside of[lang]
), no such error appears and thecatchAll
closes the "modal" as expected when any/bar/*
non-intercepted Link is clicked.
Current vs. Expected behavior
Previous behavior (prior to #58215) was that that [...catchAll]
was not matching non-intercepted routes at all. See #50284
Current behavior with this change is that error quoted above is thrown at compile time.
Expected behavior is that catch-all matches to the correct parallel route, not root.
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Pro
Binaries:
Node: 20.9.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.0.2-canary.27
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
No response
terrymun, louisthomaspro, itsjavi, zetorama and michaelschufimrjasonroy, relkrahs, tangye1234, eve0415, louisthomaspro and 2 moretangye1234, louisthomaspro, imbhargav5, zfm-andreasmatuszewski and floatingdino
Metadata
Metadata
Assignees
Labels
Linking and NavigatingRelated to Next.js linking (e.g., <Link>) and navigation.Related to Next.js linking (e.g., <Link>) and navigation.bugIssue was opened via the bug report template.Issue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.Confirmed issue that is tracked by the Next.js team.locked