Skip to content

use of client components causes error in 13.0.7-canary.3 #43854

@rafma0

Description

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: 18.4.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant packages:
  next: 13.0.7-canary.3
  eslint-config-next: 13.0.7-canary.3
  react: 18.2.0
  react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/rafma0/next-brokenuseclient

To Reproduce

Test.tsx

'use client'

export default function Test () {
  return (
    <p>test</p>
  )
}

page.tsx

import Test from './Test'

export default function HomePage () {
  return (
    <Test />
  )
}

Describe the Bug

Trying to use a client component in server page results in

Uncaught TypeError: Cannot read properties of undefined (reading 'call')
The above error occurred in the <NotFoundErrorBoundary> component
Uncaught Error: There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.

Expected Behavior

The same code works fine in 13.0.7-canary.1

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions