-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
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/sebpalluel/parallel-router-key-destructure-property-error
To Reproduce
- Install the packages with
pnpm i - Start the application in development with
pnpm run dev - The main page at
http://localhost:3000/is working, displaying a layout with parallel routes displayed conditionally in desktop or mobile view size. - Go to any non existing page like
http://localhost:3000/dummy. It will display an error message coming fromnext/dist/client/components/layout-router.js"TypeError: Cannot destructure property 'parallelRouterKey' of 'param' as it is null."
Current vs. Expected behavior
It should display the placeholder not-found.txs
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 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
Binaries:
Node: 20.1.0
npm: 9.7.1
Yarn: 1.22.19
pnpm: 8.9.2
Relevant Packages:
next: 14.0.3-canary.9
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
Additional context
When I comment out either AppNavLayoutDesktop or AppNavLayoutMobile in components/AppNavLayout.tsx, the error no longer occurs. Additionally, completely removing app/error.tsx also prevents the error, and instead, not-found.tsx is displayed as expected.
apmcodes, asplunds, fedor-usakov-sibe, kevinpastor, philippbosch and 6 moreSofRahmani, kangshuisheng and dorji-dev
Metadata
Metadata
Assignees
Labels
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