Skip to content

react-scripts start bug: Class extends value undefined is not a constructor or null #13009

@MajorMeerkatThe3rd

Description

@MajorMeerkatThe3rd

Describe the bug

It seems like the build process changed and now throws an error where there previously wasn't one. In react-scripts version 4.0.3 everything works just fine, whereas in version 5.0.1 I get the error Class extends value undefined is not a constructor or null.

Did you try recovering your dependencies?

Yes, I tried multiple setups and multiple repos. The error does not seem to be npm-version dependent.
npm: 8.1.2

Which terms did you search for in User Guide?

webpack, require, setup

Environment

Environment Info:

current version of create-react-app: 5.0.1
running from C:\Users\main\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app

System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: Not Found
Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.53)
Internet Explorer: 11.0.19041.1566
npmPackages:
react: 18.0.0 => 18.0.0
react-dom: 18.0.0 => 18.0.0
react-scripts: 5.0.1 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found

Steps to reproduce

my example repo

  1. Go to the repository that I just created for this.
  2. Try npm start with the version 4.0.3 and version 5.0.1. For 5.0.1 you will get the mentioned error in the console.
  3. For 4.0.3 everything works as expected.

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