question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build fails: Could not find plugin "proposal-numeric-separator"

See original GitHub issue

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

  1. npx create-react-app my-app
  2. cd my-app
  3. 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.

  1. npx create-react-app my-app
  2. cd my-app
  3. npm run build

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:223
  • Comments:79 (7 by maintainers)

github_iconTop GitHub Comments

57reactions
nicolo-ribaudocommented, Mar 20, 2020

⚠️ Workaround ⚠️

If you are using yarn, you can add this to your package.json:

"resolutions": {
  "@babel/preset-env": "^7.8.7"
}

If you are using npm, you can do the same thing but also need npm-force-resolutions

Then, don’t forget to run yarn install or npm install.

EDIT: See https://github.com/facebook/create-react-app/issues/8680#issuecomment-601896916 for more detailed instructions for npm.

53reactions
mohsenaricommented, Mar 20, 2020

For people who are looking for npm version of @nicolo-ribaudo 's workaround, here are the exact steps I took:

  1. delete node_modules and package-lock.json
  2. add "resolutions": { "@babel/preset-env": "^7.8.7" } to package.json
  3. npm install npm-force-resolutions --save-dev
  4. npm install
  5. npx npm-force-resolutions
  6. npm install again
  7. npm run build
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found