Skip to content

Cannot import @lexical/react #303

@tazsingh

Description

@tazsingh

When installing @lexical/react, I get the following error:

ERROR  Failed to resolve entry for package "@lexical/react". The package may have incorrect main/module/exports specified in its package.json: Missing "." specifier in "@lexical/react" package

I believe autoPreBundleDepsForSsrPlugin is trying to bundle specifically @lexical/react (and not a sub-export) within Vite, which doesn't specify a top-level barrel file for its exports, and is failing.

To replicate:

  1. Create a new One project
  2. Install @lexical/react
  3. Run the dev command

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions