-
-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Description
Describe the bug
react-scripts test command fails after updating the project to CRA (react-scripts) version 5.0.0. In previous versions it was working fine.
The error is this:
TypeError: _interopRequireWildcard is not a function
This is a continuation of #11043 (comment)
Did you try recovering your dependencies?
Yes.
Which terms did you search for in User Guide?
Jest
Webpack 5
TypeError: _interopRequireWildcard is not a function
and more
Environment
Using yarn v.3.2.0, in pnp mode, so it seems to make npm packages as Not Found using this command.
Environment Info:
System:
OS: macOS 12.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 17.3.0 - /usr/local/bin/node
Yarn: 3.2.0 - /usr/local/bin/yarn
npm: 8.3.0 - /usr/local/bin/npm
Browsers:
Chrome: 99.0.4844.51
Edge: Not Found
Firefox: 95.0.2
Safari: 15.3
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
Into a project with tests set.
- yarn
- yarn test
- Watch the fail
Expected behaviour
Tests are executed successfully, as it happens in previous CRA version.
Actual behaviour
yarn test command fails with an unexpected error. It seems related to babel. I did not add @babel/runtime as I understand is already added internally by react-scripts.
