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

Create react app is broken because of 7.9.0 #11292

Closed
Lukavyi opened this issue Mar 20, 2020 · 19 comments
Closed

Create react app is broken because of 7.9.0 #11292

Lukavyi opened this issue Mar 20, 2020 · 19 comments
Labels
area: upstream i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@Lukavyi
Copy link

Lukavyi commented Mar 20, 2020

facebook/create-react-app#8680

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.
@babel-bot
Copy link
Collaborator

Hey @Lukavyi! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."

@existentialism
Copy link
Member

@Lukavyi please read my comment within the thread: facebook/create-react-app#8680 (comment)

@ffrezende
Copy link

My pipelines broke, I have the same error. Does someone have a solution for this bug?

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Mar 20, 2020

Try adding "@babel/compat-data": "~7.8.0" to your "devDependencies", deleting "@babel/compat-data" from package-lock.json and running npm install.

If you are using yarn, this is better: facebook/create-react-app#8680 (comment)

tmcconechy added a commit to infor-design/enterprise-ng that referenced this issue Mar 20, 2020
@wandersoncesar
Copy link

Try adding "@babel/compat-data": "~7.8.0" to your "devDependencies", deleting "@babel/compat-data" from package-lock.json and running npm install.

If you are using yarn, this is better: facebook/create-react-app#8680 (comment)

Works for me in my Angular application. Thanks!

I just add "@babel/compat-data": "~7.8.0" to my "devDependencies"and ran my pipeline again.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Mar 20, 2020

@wandersoncesar It's unexpected that it broke angular 🤔
Avoid @babel/preset-env v7.8.0-7.8.6 which are broken should be enough for you.

@ChristopherTrimboli
Copy link

Our pipeline is broken because of this. Can anyone recommend a react-scripts version to roll back to that works?

@Lukavyi
Copy link
Author

Lukavyi commented Mar 20, 2020

Our pipeline is broken because of this. Can anyone recommend a react-scripts version to roll back to that works?

facebook/create-react-app#8680 (comment)

@ChristopherTrimboli
Copy link

Our pipeline is broken because of this. Can anyone recommend a react-scripts version to roll back to that works?

facebook/create-react-app#8680 (comment)

Thank you!!

@jdmarshall
Copy link

Yeah I have a whole team staying late on a Friday afternoon for this.

Why does @babel/core have caret imports of all of its children? We shouldn't be picking up every child dependency upgrade if we are still using babel/core@7.2.2

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Mar 20, 2020

Why does @babel/core have caret imports of all of its children?

Because that's almost the standard for open source JS projects.

Anyway, I'm really surprised that @babel/core's dependencies have been upgraded, both npm and yarn prevent it (even when ^ is used) thanks to their lockfiles 🤔

@jalanya
Copy link

jalanya commented Mar 20, 2020

Locally in my macOS Catalina 10.15.0, I'm getting the following error:

Failed to compile.

./src/apps/common/hoc/model/index.js
ReferenceError: Unknown helper createSuper

my configuration is
package.json

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

And from jenkins, also, i'm getting the following error:

17:31:44  > npx npm-force-resolutions
17:31:44  
17:31:48  npx: installed 5 in 3.326s
17:31:48  ENOENT: no such file or directory, open './package-lock.json'
17:31:49  npm ERR! code ELIFECYCLE
17:31:49  npm ERR! errno 1

Do you know if there is a workaround for both cases? Thanks

@nicolo-ribaudo
Copy link
Member

I don't know about the second error, but they are releasing a new CRA version with the fix!

@nicolo-ribaudo
Copy link
Member

Fixed in create-react-app 3.4.1. It should also make the error about "createSuper" disappear (even if it's an actual bug in Babel).

@rockus123
Copy link

Modern development environment with babel, react and other dependencies will create havoc all the times. Changes break suddenly and errors are not clear.

@kaicataldo
Copy link
Member

Lockfiles were introduced to help mitigate the problem of shifting dependencies. Highly recommend using one!

@tatimatch
Copy link

this(npm i @babel/compat-data@7.8.0) works for me! thanks

@jblevins1991
Copy link

You should not be using the caret symbol if you are going to accept breaking changes into minor releases on code that you control. If you introduce breaking changes on a minor version release you should be burdened with fixing it, not everyone that depends on you. Why is this such a hard concept in the javascript industry.

@nicolo-ribaudo
Copy link
Member

@jblevins1991 We fixed it in 7.8.7.

If you depend on open source software you are not helping to maintain and you are not supporting in any way (neither with human time nor financially), you are not entitled to complain about what the maintainers are doing. I assure you that we are trying to do our best. Why is this such a hard concept in the tech industry.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: upstream i: bug outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests