-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Description
Link to the code that reproduces this issue
https://github.com/jon-ressio/vercel-prop-warn-error
To Reproduce
- Start the application in dev mode
- Load the app in a browser
- See Error page
Note: This only happens when running under next dev
, next build && next start
works as expected
Current vs. Expected behavior
From page.tsx, <Thing>
is included twice. The first instance causes Warning: Only plain objects can be passed to Client Components from Server Components. URL objects are not supported.
to show up in the server console, but the second instance causes the page to error out with: TypeError: Cannot convert a Symbol value to a string
The as={SomeLink}
prop seems to not be handled by the Next/react warning, so the code trying to generate/show the warning causes a runtime error.
Expected: To render the same warning for the second <Thing>
as done for the first.
Provide environment information
NOTE: I did test this in 4.1.1-canary.50 and the issue still exists
Operating System:
Platform: linux
Arch: x64
Version: #1 ZEN SMP PREEMPT_DYNAMIC Mon, 05 Feb 2024 22:07:37 +0000
Binaries:
Node: 18.19.0
npm: 10.2.3
Yarn: 1.22.21
pnpm: 8.15.1
Relevant Packages:
next: 14.1.0
eslint-config-next: 14.0.4
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: N/A
warn - Latest canary version not detected, detected: "14.1.0", newest: "14.1.1-canary.50".
Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Issue does not exist in 13.5.6, does exist in 14.0.0