Build fails: Could not find plugin "proposal-numeric-separator"
See original GitHub issueDescribe 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:223
- Comments:79 (7 by maintainers)
Top Results From Across the Web
Could not find plugin "proposal-numeric-separator"
I faced similar issue and i was able to fix it by updating all babel dependencies to latest version. I'm not aware of...
Read more >Could not find plugin "proposal-numeric-separator" - Ionic Forum
Project created server successfully but when I am creating the build for android or ios it's showing me an error, even in fresh...
Read more >How to fix could not find plugin proposal-numeric-separator in ...
Even when you install proposal-numeric-separator dependency the error won't go away! Today I will show two ways to fix this issue: Solution 1....
Read more >Could not find plugin “proposal numeric separator” - YouTube
I've faced this error when I tried to deploy my ReactJS/NodeJS application:Could not find plugin “proposal numeric separator”.
Read more >Angular Production Build Could Not Find Plugin "proposal ...
[Solved]-Angular Production Build Could Not Find Plugin "proposal-numeric-separator"-angular.js. Search. score:1. Had the same issue during angular 8 PROD ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
⚠️ Workaround ⚠️
If you are using
yarn
, you can add this to yourpackage.json
:If you are using
npm
, you can do the same thing but also neednpm-force-resolutions
Then, don’t forget to run
yarn install
ornpm install
.EDIT: See https://github.com/facebook/create-react-app/issues/8680#issuecomment-601896916 for more detailed instructions for npm.
For people who are looking for npm version of @nicolo-ribaudo 's workaround, here are the exact steps I took:
"resolutions": { "@babel/preset-env": "^7.8.7" }
to package.jsonnpm install npm-force-resolutions --save-dev
npm install
npx npm-force-resolutions
npm install
againnpm run build