Open
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
Binaries:
Node: 16.17.0
npm: 8.15.0
Yarn: 1.22.19
pnpm: 7.1.0
Relevant packages:
next: 13.4.7-canary.2
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 4.9.5
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/winter-bash-kvw9lz?file=%2Fapp%2FComponent.tsx
To Reproduce
- Given I have a (by default) React server component
- I import a React client component boundary (one with
"use client"
clause) - The component module happens to use
dot notation
for composition of several components - Page crashes with
Error: Unsupported Server Component type: undefined
Describe the Bug
Unhandled Runtime Error
Error: Unsupported Server Component type: undefined
Call Stack
attemptResolveElement
node_modules/next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js (1484:8)
or
node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js (51:14)
@ Object.get
Error: Cannot access .Foo on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
Expected Behavior
Code compiles without fail.
Which browser are you using? (if relevant)
irrelevant
How are you deploying your application? (if relevant)
Vercel
Metadata
Assignees
Labels
No labels
Activity