react-scripts start bug: Class extends value undefined is not a constructor or null
Created by: 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
- Go to the repository that I just created for this.
- Try
npm start
with the version4.0.3
and version5.0.1
. For5.0.1
you will get the mentioned error in the console. - For
4.0.3
everything works as expected.