Skip to content

Bug: react-refresh invalid main entry #19835

@wojtekmaj

Description

@wojtekmaj

Steps To Reproduce

  1. Try to require react-refresh package directly ('react-refresh', not anything like 'react-refresh/runtime').

The current behavior

Error: Cannot find module '/node_modules/react-refresh/index.js'. Please verify that the package.json has a valid "main" entry

Indeed, main field in react-refresh points to index.js, which is simply not there. There's babel.js and runtime.js

The expected behavior

  • index.js file to be created, printing an error that you should require …/babel or …/runtime instead.
  • OR main entry file changed to babel.js or runtime.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions