Skip to content

Runtime error: "Element type is invalid" for React 19.2 Activities #84489

@AdrianAndersen

Description

@AdrianAndersen

Link to the code that reproduces this issue

https://github.com/AdrianAndersen/next-react-activity-bug

To Reproduce

The provided repository is created using pdx create-next-app@latest with defaults.

I then upgraded to react and react-dom 19.2.0 and added an Activity

A runtime error is thrown when you visit http://localhost:3000/ in dev mode, or when you try to run a production build.

Current vs. Expected behavior

A runtime error is thrown when a React Activity is present in the rendered code

Error Type

Runtime Error

Error Message

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of Home.

Next.js version: 15.5.4 (Turbopack)

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.0.0: Mon Aug 25 21:17:51 PDT 2025; root:xnu-12377.1.9~3/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.13.1
  npm: 10.9.2
  Yarn: 1.22.22
  pnpm: 10.16.0
Relevant Packages:
  next: 15.5.4 // Latest available version is detected (15.5.4).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

React

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

I also tested on 15.6.0-canary.41 (as of writing the latest canary), and the error is present there too.

I tested React Activities in a TanStack Router project, and since it worked there I assume this is related to something in Next.js. Please correct me if this should be submitted somewhere else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ReactRelated to React.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions