Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
amuehl opened this issue Mar 20, 2020 · 79 comments
Closed

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

amuehl opened this issue Mar 20, 2020 · 79 comments
Labels
Milestone

Comments

@amuehl
Copy link

@amuehl amuehl commented Mar 20, 2020

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
@rosbel

This comment was marked as spam.

Copy link

@rosbel rosbel commented Mar 20, 2020

This started affecting my team as well

@Volosh1n

This comment was marked as spam.

Copy link

@Volosh1n Volosh1n commented Mar 20, 2020

Same here

@adascal

This comment has been minimized.

Copy link

@adascal adascal commented Mar 20, 2020

Possible related to new babel-loader release (about 2 hours ago)
ref: https://github.com/babel/babel-loader/releases

@floofydoug

This comment was marked as spam.

Copy link

@floofydoug floofydoug commented Mar 20, 2020

affecting me as well.

@PFadel

This comment was marked as spam.

Copy link

@PFadel PFadel commented Mar 20, 2020

me too

1 similar comment
@Simon-Bin

This comment has been minimized.

Copy link

@Simon-Bin Simon-Bin commented Mar 20, 2020

me too

@gonzofish

This comment has been minimized.

Copy link

@gonzofish gonzofish commented Mar 20, 2020

Hey everyone, thumbs up the original post. Adding "me too" just becomes noise to the maintainers

@existentialism

This comment has been minimized.

Copy link
Contributor

@existentialism existentialism commented Mar 20, 2020

This bug was fixed in Babel by babel/babel#11201, and here once #8620 gets released.

@gonzofish

This comment has been minimized.

Copy link

@gonzofish gonzofish commented Mar 20, 2020

Thanks @existentialism! Is there any solution/workaround in the meantime?

@vamci07

This comment has been minimized.

Copy link

@vamci07 vamci07 commented Mar 20, 2020

I’m using babel-loader@8.0.6, but still have the issue

@MKrupauskas

This comment has been minimized.

Copy link

@MKrupauskas MKrupauskas commented Mar 20, 2020

Ejecting and updating the babel dependency would be a way of fixing this in the meantime.

@MMachado-uy

This comment has been minimized.

Copy link

@MMachado-uy MMachado-uy commented Mar 20, 2020

+1

@apipemc

This comment was marked as spam.

Copy link

@apipemc apipemc commented Mar 20, 2020

affecting me as well.

@m-malik15

This comment has been minimized.

Copy link

@m-malik15 m-malik15 commented Mar 20, 2020

I am getting the same error when building angular 8 app in azure deveops pipeline

"An unhandled exception occurred: [BABEL] D:\a\1\s\dist\web\main-es2015.02f4b8f684805898bcff.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "D:\a\1\s\node_modules\@babel\preset-env\lib\index.js")

@caballerojavier13

This comment has been minimized.

Copy link

@caballerojavier13 caballerojavier13 commented Mar 20, 2020

+1

@daviguelfi

This comment was marked as spam.

Copy link

@daviguelfi daviguelfi commented Mar 20, 2020

Same problem here

@anthonyikeda

This comment was marked as off-topic.

Copy link

@anthonyikeda anthonyikeda commented Mar 20, 2020

For quick fix you can eject and downgrade babel-preset-react-app to 9.0.0(maybe more recent will work too)

Do you have a link on how I can achieve this? New to React/Node.

@Lukavyi

This comment was marked as off-topic.

Copy link

@Lukavyi Lukavyi commented Mar 20, 2020

For quick fix you can eject and downgrade babel-preset-react-app to 9.0.0(maybe more recent will work too)

Do you have a link on how I can achieve this? New to React/Node.

  1. npm run eject
  2. Open package.json and set "babel-preset-react-app": "9.0.0"
    (note: use exactly "9.0.0", not "^9.0.0")
  3. npm i
@kuhel

This comment was marked as spam.

Copy link

@kuhel kuhel commented Mar 20, 2020

The issue is still reproduced

@rachelruderman

This comment has been minimized.

Copy link

@rachelruderman rachelruderman commented Mar 20, 2020

Quick fix: Downgrading to "react-scripts": "^2.1.5", worked for my team!! No ejection necessary

EDIT: update thanks to @mohsenari:

I strongly suggest not using this as it results in 88 vulnerabilities from npm audit.
added 1940 packages from 744 contributors and audited 40593 packages in 44.492s found 88 vulnerabilities (81 low, 2 moderate, 5 high)

@nicolo-ribaudo

This comment has been minimized.

Copy link

@nicolo-ribaudo nicolo-ribaudo commented 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 #8680 (comment) for more detailed instructions for npm.

@anthonyikeda

This comment was marked as spam.

Copy link

@anthonyikeda anthonyikeda commented Mar 20, 2020

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

This worked for me as did the downgrading of react-scripts separately.

@salih7

This comment was marked as off-topic.

Copy link

@salih7 salih7 commented Mar 20, 2020

The problem is in babel-preset-react-app. For some reason when you install it, it strictly requires @babel/preset-env@7.8.4.

It looks like it's already updated to require @babel/preset-env@7.8.7 11 days ago in the package.json for babel-preset-react-app.

I had to use the workaround above combined with using the npm-force-resolutions* package.

"scripts": {
  "preinstall": "npx npm-force-resolutions",
  ...
},
"resolutions": {
  "@babel/preset-env": "^7.8.7"
}

*Note that this requires a complete package-lock.json with the transitive dependencies that need updating.

This should only need to be done temporarily until the issue outlined above is fixed.

Edit - Just want to add that I'm able to use react-scripts@3.4.0

@leetmachine

This comment was marked as spam.

Copy link

@leetmachine leetmachine commented Mar 20, 2020

⚠️

Workaround if you are using yarn.

Add this to your package.json:

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

Worked for me, I also deleted node_modules and reinstall.

@Memogcia

This comment has been minimized.

Copy link

@Memogcia Memogcia commented Mar 20, 2020

WARNING running command eject is one-way operation.

thanks to @nicolo-ribaudo, the solution works with react-scripts 3.3.1

As @leetmachine says delete node_modules and yarn.lock

@existentialism

This comment has been minimized.

Copy link
Contributor

@existentialism existentialism commented Mar 20, 2020

@arinhouck just fyi, but your issue is a bit different, check out babel/babel#11298

@premp-cloud

This comment has been minimized.

Copy link

@premp-cloud premp-cloud commented Mar 20, 2020

@stenwie0591 our team is also experiencing error on Heroku deploy for a node react app using yarn. Workaround is not doing anything for us either.
We are seeing the following error:

[!] (plugin babel) ReferenceError: /tmp/build_4c6997ef6fd5b4162d9721111196c3c8/packages/core-ui/src/index.js: Unknown helper createSuper

Not seeing the issue happen when building locally, however specified "@babel/preset-env": "^7.8.0", and ran yarn install and then it reproduced locally. It seems like heroku is bumping or not respecting lock file?

if it is bumping or not respecting then remove the caret likes this: "@babel/preset-env": "7.8.0",

Heroku updates the dependencies - hence the error.
We got this locally itself. npm update was good but the error appeared in npm start.

Starting the development server...
Failed to compile.
./node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL] C:\projects\react\node_modules\react-dev-utils\webpackHotDevClient.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\projects\react\node_modules\babel-preset-react-app\dependencies.js$0")
at Array.map ()
at Generator.next ()

Tried with "react-scripts": "3.4.0", and "react-scripts": "3.4.0" - no success.
Changed @babel/preset-env": "^7.8.7" - no success

@arinhouck

This comment has been minimized.

Copy link

@arinhouck arinhouck commented Mar 20, 2020

@stenwie0591 our team is also experiencing error on Heroku deploy for a node react app using yarn. Workaround is not doing anything for us either.
We are seeing the following error:

[!] (plugin babel) ReferenceError: /tmp/build_4c6997ef6fd5b4162d9721111196c3c8/packages/core-ui/src/index.js: Unknown helper createSuper

Not seeing the issue happen when building locally, however specified "@babel/preset-env": "^7.8.0", and ran yarn install and then it reproduced locally. It seems like heroku is bumping or not respecting lock file?

if it is bumping or not respecting then remove the caret likes this: "@babel/preset-env": "7.8.0",

I did this and now I got the error about proposal-numeric-seperator locally

@nicolo-ribaudo

This comment has been minimized.

Copy link

@nicolo-ribaudo nicolo-ribaudo commented Mar 20, 2020

@arinhouck 7.8.0-7.8.6 are the broken version. Try 7.8.7, 7.7.0 or 7.9.0.

@nicolo-ribaudo

This comment has been minimized.

Copy link

@nicolo-ribaudo nicolo-ribaudo commented Mar 20, 2020

+1. Breaking the build on friday afternoon... for shame!

Please note that we fixed this bug 2 weeks ago in @babel/preset-env 7.8.7 😉

FYI, the bug was that @babel/preset-env 7.8.0-7.8.6 throw if we add any new feature to newer preset-env versions.

@arinhouck

This comment has been minimized.

Copy link

@arinhouck arinhouck commented Mar 20, 2020

7.8.7

I switched to those versions (7.8.7 and 7.9.0) then received my previous error again

(plugin babel) ReferenceError: /Users/arinhouck/Documents/github/homelight-react/packages/core-ui/src/index.js: Unknown helper createSuper
@existentialism

This comment has been minimized.

Copy link
Contributor

@existentialism existentialism commented Mar 20, 2020

@arinhouck see my message above re: Unknown helper createSuper :)

@nicolo-ribaudo

This comment has been minimized.

Copy link

@nicolo-ribaudo nicolo-ribaudo commented Mar 20, 2020

@arinhouck We have an open PR for that, I hope to release it soon.

@sebastianvz

This comment was marked as spam.

Copy link

@sebastianvz sebastianvz commented Mar 20, 2020

affecting me too ..

I try doing :

  1. Update react.
  2. npm run eject . this change whole package.json
  3. npm-force-resolutions.

nothing works

@Wremeker

This comment was marked as spam.

Copy link

@Wremeker Wremeker commented Mar 20, 2020

same problem :)

@DatChoob

This comment has been minimized.

Copy link

@DatChoob DatChoob commented Mar 20, 2020

Looks like Yarn users are having an easier time fixing this issue? Might have to switch.
Still having problems with npm

@carlos-soto

This comment has been minimized.

Copy link

@carlos-soto carlos-soto commented Mar 20, 2020

@stenwie0591 our team is also experiencing error on Heroku deploy for a node react app using yarn. Workaround is not doing anything for us either.
We are seeing the following error:

[!] (plugin babel) ReferenceError: /tmp/build_4c6997ef6fd5b4162d9721111196c3c8/packages/core-ui/src/index.js: Unknown helper createSuper

Not seeing the issue happen when building locally, however specified "@babel/preset-env": "^7.8.0", and ran yarn install and then it reproduced locally. It seems like heroku is bumping or not respecting lock file?

if it is bumping or not respecting then remove the caret likes this: "@babel/preset-env": "7.8.0",

Heroku updates the dependencies - hence the error.
We got this locally itself. npm update was good but the error appeared in npm start.

Starting the development server...
Failed to compile.
./node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL] C:\projects\react\node_modules\react-dev-utils\webpackHotDevClient.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\projects\react\node_modules\babel-preset-react-app\dependencies.js$0")
at Array.map ()
at Generator.next ()

Tried with "react-scripts": "3.4.0", and "react-scripts": "3.4.0" - no success.
Changed @babel/preset-env": "^7.8.7" - no success

I had to downgrade "react-scripts" to "3.0.0" for now, thee npm-force-resolutions approach didn't work for me on npm.

@tacnoman

This comment has been minimized.

Copy link

@tacnoman tacnoman commented Mar 20, 2020

The same here, I'm using npm instead of yarn and the solution with resolution in package.json doesnt work

@sebastianvz

This comment has been minimized.

Copy link

@sebastianvz sebastianvz commented Mar 20, 2020

@stenwie0591 our team is also experiencing error on Heroku deploy for a node react app using yarn. Workaround is not doing anything for us either.
We are seeing the following error:

[!] (plugin babel) ReferenceError: /tmp/build_4c6997ef6fd5b4162d9721111196c3c8/packages/core-ui/src/index.js: Unknown helper createSuper

Not seeing the issue happen when building locally, however specified "@babel/preset-env": "^7.8.0", and ran yarn install and then it reproduced locally. It seems like heroku is bumping or not respecting lock file?

if it is bumping or not respecting then remove the caret likes this: "@babel/preset-env": "7.8.0",

Heroku updates the dependencies - hence the error.
We got this locally itself. npm update was good but the error appeared in npm start.

Starting the development server...
Failed to compile.
./node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL] C:\projects\react\node_modules\react-dev-utils\webpackHotDevClient.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\projects\react\node_modules\babel-preset-react-app\dependencies.js$0")
at Array.map ()
at Generator.next ()

Tried with "react-scripts": "3.4.0", and "react-scripts": "3.4.0" - no success.
Changed @babel/preset-env": "^7.8.7" - no success

I had to downgrade "react-scripts" to "3.0.0" for now, thee npm-force-resolutions approach didn't work for me on npm.

How did you do the downgrade ?

@nicolo-ribaudo

This comment has been minimized.

Copy link

@nicolo-ribaudo nicolo-ribaudo commented Mar 20, 2020

@tacnoman Try adding "@babel/compat-data": "7.8.0" to your dev dependencies, it might work (it's not guaranteed to, it depends on npm hoisting)

@carlos-soto

This comment has been minimized.

Copy link

@carlos-soto carlos-soto commented Mar 20, 2020

@stenwie0591 our team is also experiencing error on Heroku deploy for a node react app using yarn. Workaround is not doing anything for us either.
We are seeing the following error:

[!] (plugin babel) ReferenceError: /tmp/build_4c6997ef6fd5b4162d9721111196c3c8/packages/core-ui/src/index.js: Unknown helper createSuper

Not seeing the issue happen when building locally, however specified "@babel/preset-env": "^7.8.0", and ran yarn install and then it reproduced locally. It seems like heroku is bumping or not respecting lock file?

if it is bumping or not respecting then remove the caret likes this: "@babel/preset-env": "7.8.0",

Heroku updates the dependencies - hence the error.
We got this locally itself. npm update was good but the error appeared in npm start.

Starting the development server...
Failed to compile.
./node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL] C:\projects\react\node_modules\react-dev-utils\webpackHotDevClient.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\projects\react\node_modules\babel-preset-react-app\dependencies.js$0")
at Array.map ()
at Generator.next ()

Tried with "react-scripts": "3.4.0", and "react-scripts": "3.4.0" - no success.
Changed @babel/preset-env": "^7.8.7" - no success

I had to downgrade "react-scripts" to "3.0.0" for now, thee npm-force-resolutions approach didn't work for me on npm.

How did you do the downgrade ?

Just change your package.json to:
"react-scripts": "3.0.0",

@TiKo98

This comment has been minimized.

Copy link

@TiKo98 TiKo98 commented Mar 20, 2020

The problem is in babel-preset-react-app. For some reason when you install it, it strictly requires @babel/preset-env@7.8.4.

It looks like it's already updated to require @babel/preset-env@7.8.7 11 days ago in the package.json for babel-preset-react-app.

I had to use the workaround above combined with using the npm-force-resolutions* package.

"scripts": {
  "preinstall": "npx npm-force-resolutions",
  ...
},
"resolutions": {
  "@babel/preset-env": "^7.8.7"
}

*Note that this requires a complete package-lock.json with the transitive dependencies that need updating.

This should only need to be done until the issue outlined above is fixed.

Edit - Just want to add that I'm able to use react-scripts@3.4.0

All the suggested solutions did not work until I used preinstall hook! Now it works on localhost and on heroku in production mode.

@ianschmitz ianschmitz pinned this issue Mar 20, 2020
@sebastianvz

This comment was marked as spam.

Copy link

@sebastianvz sebastianvz commented Mar 20, 2020

@stenwie0591 our team is also experiencing error on Heroku deploy for a node react app using yarn. Workaround is not doing anything for us either.
We are seeing the following error:

[!] (plugin babel) ReferenceError: /tmp/build_4c6997ef6fd5b4162d9721111196c3c8/packages/core-ui/src/index.js: Unknown helper createSuper

Not seeing the issue happen when building locally, however specified "@babel/preset-env": "^7.8.0", and ran yarn install and then it reproduced locally. It seems like heroku is bumping or not respecting lock file?

if it is bumping or not respecting then remove the caret likes this: "@babel/preset-env": "7.8.0",

Heroku updates the dependencies - hence the error.
We got this locally itself. npm update was good but the error appeared in npm start.

Starting the development server...
Failed to compile.
./node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL] C:\projects\react\node_modules\react-dev-utils\webpackHotDevClient.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\projects\react\node_modules\babel-preset-react-app\dependencies.js$0")
at Array.map ()
at Generator.next ()

Tried with "react-scripts": "3.4.0", and "react-scripts": "3.4.0" - no success.
Changed @babel/preset-env": "^7.8.7" - no success

I had to downgrade "react-scripts" to "3.0.0" for now, thee npm-force-resolutions approach didn't work for me on npm.

How did you do the downgrade ?

Just change your package.json to:
"react-scripts": "3.0.0",

Doesn`t work for me

@facebook facebook locked as spam and limited conversation to collaborators Mar 20, 2020
@ianschmitz

This comment has been minimized.

Copy link
Collaborator

@ianschmitz ianschmitz commented Mar 20, 2020

Locking the thread to cut down on the excessive spam. We're actively working to make sure this is resolved. Please be patient.

@ianschmitz

This comment has been minimized.

Copy link
Collaborator

@ianschmitz ianschmitz commented Mar 20, 2020

Waiting on babel/babel#11298 to be merged and released then we should be able to bump the versions on our side and release (hopefully!).

We think #8681 should resolve this without the PR from babel side as we shouldn't encounter that specific scenario here.

@ianschmitz ianschmitz added this to the 3.4.1 milestone Mar 20, 2020
@ianschmitz

This comment has been minimized.

Copy link
Collaborator

@ianschmitz ianschmitz commented Mar 20, 2020

Looks like we've fixed in #8661. Will be releasing shortly. Thanks for the patience everyone!

@ianschmitz

This comment has been minimized.

Copy link
Collaborator

@ianschmitz ianschmitz commented Mar 21, 2020

This should be fixed in the 3.4.1 release.

Update react-scripts to 3.4.1 in your package.json file and remove node_modules as well as package-lock.json/yarn.lock and re-install.

As always we recommend using and committing the package lock file to your repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

You can’t perform that action at this time.