Build fails: Could not find plugin "proposal-numeric-separator"
Created by: muehlbaueralex
Describe the bug
Running npm run build
will fail on any project, even on a vanilla app created with create-react-app
will fail with the following error:
Error: [BABEL] /Users/<username>/Projects/my-app/src/index.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/Users/<username>/Projects/my-app/node_modules/babel-preset-react-app/index.js$0")
at Array.map (<anonymous>)
at Generator.next (<anonymous>)
at Generator.next (<anonymous>)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
From our build pipelines I can tell it started roughly around Mar 20, 2020 4:48pm GMT+0100
Did you try recovering your dependencies?
I tried recovering the module tree and even verified with a vanilla app. It happens on my local machine and on our build machines with no changes involved there.
$ npm --version
6.13.1
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
$ npx create-react-app --info
Environment Info:
System:
OS: macOS 10.15.3
CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
Binaries:
Node: 13.2.0 - /usr/local/bin/node
Yarn: 1.19.2 - /usr/local/bin/yarn
npm: 6.13.1 - /usr/local/bin/npm
Browsers:
Chrome: 80.0.3987.149
Firefox: 68.0.2
Safari: 13.0.5
npmPackages:
react: ^16.13.1 => 16.13.1
react-dom: ^16.13.1 => 16.13.1
react-scripts: 3.4.0 => 3.4.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
npx create-react-app my-app
cd my-app
npm run build
Expected behavior
The build is successful with no error.
Reproducible demo
As mentioned in the above sections a vanilla app is enough to reproduce.
npx create-react-app my-app
cd my-app
npm run build