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

fix(babel-preset-react-app): add missing dependency #12364

Conversation

eventualbuddha
Copy link
Contributor

In #11318 a change was made to babel-preset-react-app to require @babel/plugin-proposal-private-property-in-object, but no such dependency was added to package.json. This fixes that by adding the dependency.

@merceyz
Copy link
Contributor

merceyz commented May 5, 2022

This fix is already in #11751.

@eventualbuddha
Copy link
Contributor Author

True, but why hasn't that PR been merged? It's been 5 months.

@eventualbuddha eventualbuddha force-pushed the add-@babel/plugin-proposal-private-property-in-object-dependency branch from be1134e to 6d37be4 Compare June 24, 2022 17:59
@eventualbuddha
Copy link
Contributor Author

Anyone coming to this later, it appears this bug was introduced in 10.0.1, so using 10.0.0 works around the issue. I'd still like to see this fixed, but given that 10.0.1 was released 6 months ago and 10.0.0 two years ago I don't see that as terribly likely.

@merceyz
Copy link
Contributor

merceyz commented Jun 24, 2022

True, but why hasn't that PR been merged? It's been 5 months.

I'm assuming the maintainers are lacking the bandwidth to review it.

@eventualbuddha
Copy link
Contributor Author

I'm assuming the maintainers are lacking the bandwidth to review it.

As a maintainer of various projects that I can only make time for here and there, I get it. But since 10.0.0 doesn't have this issue (and I can use pnpmfile.js to work around it in 10.0.1) I'm not really upset.

That said, this is an easy one to review so if any maintainers want a quick win, here it is 😄

@merceyz
Copy link
Contributor

merceyz commented Jun 24, 2022

and I can use pnpmfile.js to work around it in 10.0.1

Actually if you're using pnpm@>=7.0.1 it should apply this fix automatically for you since it's in the compat database used by both Yarn and pnpm.

@indutny
Copy link

indutny commented Feb 17, 2023

Any chance this could be merged?

@eventualbuddha
Copy link
Contributor Author

@indutny I don't think this will ever be fixed. I recommend switching to vite like I did.

In facebook#11318 a change was made to `babel-preset-react-app` to require `@babel/plugin-proposal-private-property-in-object`, but no such dependency was added to `package.json`. This fixes that mistake by adding the dependency.
@robhogan robhogan force-pushed the add-@babel/plugin-proposal-private-property-in-object-dependency branch from 6d37be4 to 59663b7 Compare May 29, 2023 21:34
@robhogan
Copy link

Looks like this old bug is highlighted by a recent Babel update, which means pre-existing CRA projects are breaking on semver-minor Babel bumps - babel/babel#15655.

I'm not a regular maintainer here but as this is a straightforward fix, I'm merging it. @iansu / @gaearon / @rickhanlonii, what do we need to do get a patch release out?

@robhogan robhogan merged commit 0f5e990 into facebook:main May 29, 2023
@eventualbuddha eventualbuddha deleted the add-@babel/plugin-proposal-private-property-in-object-dependency branch May 31, 2023 03:33
@m-nathani
Copy link

Hi @robhogan , hope you are doing well.

It took almost a year to merge this issue... however, do you see the fix to be release soon. ?

jasonaowen added a commit to PhilanthropyDataCommons/front-end that referenced this pull request Aug 22, 2023
Running the latest version of Storybook logged a warning during
building:

    One of your dependencies, babel-preset-react-app, is importing the
    "@babel/plugin-proposal-private-property-in-object" package without
    declaring it in its dependencies. This is currently working because
    "@babel/plugin-proposal-private-property-in-object" is already in
    your node_modules folder for unrelated reasons, but it may break at
    any time.

    babel-preset-react-app is part of the create-react-app project,
    which is not maintianed anymore. It is thus unlikely that this bug
    will ever be fixed. Add
    "@babel/plugin-proposal-private-property-in-object" to your
    devDependencies to work around this error. This will make this
    message go away.

As the warning indicates, this is a known issue in create-react-app[1],
which was actually fixed[2], but there has not been a release with that
fix.

Add the plugin to our devDependencies to work around the issue. Long
term, we need to figure out what to do about create-react-app.

[1] facebook/create-react-app#13325
[2] facebook/create-react-app#12364
jasonaowen added a commit to PhilanthropyDataCommons/front-end that referenced this pull request Aug 22, 2023
Running the latest version of Storybook logged a warning during
building:

    One of your dependencies, babel-preset-react-app, is importing the
    "@babel/plugin-proposal-private-property-in-object" package without
    declaring it in its dependencies. This is currently working because
    "@babel/plugin-proposal-private-property-in-object" is already in
    your node_modules folder for unrelated reasons, but it may break at
    any time.

    babel-preset-react-app is part of the create-react-app project,
    which is not maintianed anymore. It is thus unlikely that this bug
    will ever be fixed. Add
    "@babel/plugin-proposal-private-property-in-object" to your
    devDependencies to work around this error. This will make this
    message go away.

As the warning indicates, this is a known issue in create-react-app[1],
which was actually fixed[2], but there has not been a release with that
fix.

Add the plugin to our devDependencies to work around the issue. Long
term, we need to figure out what to do about create-react-app.

[1] facebook/create-react-app#13325
[2] facebook/create-react-app#12364
GoetzGoerisch pushed a commit to umati/create-react-app that referenced this pull request Dec 6, 2023
In facebook#11318 a change was made to `babel-preset-react-app` to require `@babel/plugin-proposal-private-property-in-object`, but no such dependency was added to `package.json`. This fixes that mistake by adding the dependency.
unional pushed a commit to unional/create-react-app that referenced this pull request Feb 21, 2024
In facebook#11318 a change was made to `babel-preset-react-app` to require `@babel/plugin-proposal-private-property-in-object`, but no such dependency was added to `package.json`. This fixes that mistake by adding the dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants