Skip to content

Build fails on baseline code example using React 18 #2111

Closed
@mor10

Description

@mor10

Related: modernweb-dev/example-projects#928.

In a project using React v18 when the build process runs, the generated page is blank and console returns the following error:

Uncaught SyntaxError: The requested module './../node_modules/react/index.js' does not provide an export named 'default' (at App.jsx:1:8)

These issues cascade down the dependency tree. If React v16 is used, the same issue does not appear.

To reproduce, clone the react-jsx example, update the dependencies to React 18, and test.

Not sure if this issue originates with esbuild or modernweb-dev but it is not documented and is reproducible across all projects I've tested running React v18.

Metadata

Metadata

Assignees

No one assigned

    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