-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
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: 18.13.0
npm: 8.13.2
Yarn: 1.22.19
pnpm: 8.6.6
Relevant Packages:
next: 13.4.10-canary.0
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.4
Next.js Config:
output: N/AWhich area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
https://github.com/tom-sherman/nextjs-key-prototype-bug
To Reproduce
import *a "use client" module- Render an exported component from that module without a key in a server component eg.
<Client.Component>in an array without a key next dev
Describe the Bug
Receive an error on first load after starting the dev server
error node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js (51:14) @ Object.get
- error Error: Cannot access .prototype on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
at Component (./app/component.tsx:11:87)
at stringify (<anonymous>)
This error goes away after refresh
Expected Behavior
The component should render without errors and I should receive a missing key warning.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
mrfullset, ericvalcik, wyhaya, tylermadsen, sreuter and 5 more
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