-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
fix(babel-preset-react-app): add missing dependency #12364
Conversation
This fix is already in #11751. |
True, but why hasn't that PR been merged? It's been 5 months. |
be1134e
to
6d37be4
Compare
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. |
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 😄 |
Actually if you're using |
Any chance this could be merged? |
@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.
6d37be4
to
59663b7
Compare
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? |
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. ? |
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
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
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.
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.
* fix(babel-preset-react-app): add missing dependency (facebook#12364) 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. * Migrate from Azure Pipelines to GitHub Actions (facebook#13222) Beyond just a pure migration, this also: - Drops Node 14 usage from CI (which also removes the need for explicit npm 8 installs) - Removes the "old node" test, which just checked that installing on old node failed. We shouldn't need to test that - Consolidates the build & test workflows so we don't end up with a proliferation of workflows. * Update running-tests.md Update running-tests * chore: upgrade RTL version to avoid peer-deps mismatch * Update types from facebook#13725 Co-authored-by: Rajhans Jadhao <[email protected]> * Fix tests * Fix e2e tests * Add act * try this instead * update react-scripts react devDep * idk * Update tests * skip svg component test * Deprecate Create React App officially by changing the README, and adding a message on init (facebook#17003) It's probably time to make this project document its status as being deprecated and not recommended for production usage. To change it: - I opted to add a header to the README saying its over and you should go look at https://react.dev/learn/start-a-new-react-project - I left a note saying that if you are following, it is maybe worth carrying on. While I hear react 19 doesn't work with CRA, I wouldn't be surprised that a good chunk of tutorials would still work. Open to being a bit more hard-lined there but there was a lot of great resources for learning react in that era and it seems like a waste to be making people stop early? - I added a message inside the CLI, it shows once and says "don't use this, use the stuff in https://react.dev/learn/start-a-new-react-project" --------- Co-authored-by: Ricky <[email protected]> Co-authored-by: Rick Hanlon <[email protected]> * Update deprecation link (facebook#17015) Updates to a shortlink that we can redirect as needed for old versions. Currently 404 * Add deprecation to website (facebook#17008) - Adds a banner with deprecation notice - Adds a noindex meta tag to home page to remove from search - Add og meta info for when noindex is ignored * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Migrate from Azure Pipelines to GitHub Actions (facebook#13222) Beyond just a pure migration, this also: - Drops Node 14 usage from CI (which also removes the need for explicit npm 8 installs) - Removes the "old node" test, which just checked that installing on old node failed. We shouldn't need to test that - Consolidates the build & test workflows so we don't end up with a proliferation of workflows. * Update running-tests.md Update running-tests * chore: upgrade RTL version to avoid peer-deps mismatch * Update types from facebook#13725 Co-authored-by: Rajhans Jadhao <[email protected]> * Fix tests * Fix e2e tests * Add act * try this instead * update react-scripts react devDep * idk * Update tests * skip svg component test * Deprecate Create React App officially by changing the README, and adding a message on init (facebook#17003) It's probably time to make this project document its status as being deprecated and not recommended for production usage. To change it: - I opted to add a header to the README saying its over and you should go look at https://react.dev/learn/start-a-new-react-project - I left a note saying that if you are following, it is maybe worth carrying on. While I hear react 19 doesn't work with CRA, I wouldn't be surprised that a good chunk of tutorials would still work. Open to being a bit more hard-lined there but there was a lot of great resources for learning react in that era and it seems like a waste to be making people stop early? - I added a message inside the CLI, it shows once and says "don't use this, use the stuff in https://react.dev/learn/start-a-new-react-project" --------- Co-authored-by: Ricky <[email protected]> Co-authored-by: Rick Hanlon <[email protected]> * Update deprecation link (facebook#17015) Updates to a shortlink that we can redirect as needed for old versions. Currently 404 * Add deprecation to website (facebook#17008) - Adds a banner with deprecation notice - Adds a noindex meta tag to home page to remove from search - Add og meta info for when noindex is ignored * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Disable deprecation warning and version check * Bump version * Disable deleting folder after error * Fix babel-plugin-named-asset-import version number * Bump @upleveled/create-react-app to 5.1.2 * Bump version of @upleveled/react-scripts to 5.1.1 * Add back call to createApp() * Bump version of @upleveled/create-react-app to 5.1.3 * Revert to published versions of react-scripts dependencies * Bump version of @upleveled/react-scripts to 5.1.2 * Allow pnpm to build @parcel/watcher, ignore core-js builds * Bump version of @upleveled/cra-template to 1.3.1 * Remove pnpm config from package.json, bump to @upleveled/[email protected] * Add pnpm built packages configuration in `package.json` * Bump @upleveled/create-react-app to 5.1.4 --------- Co-authored-by: Brian Donovan <[email protected]> Co-authored-by: Paul O’Shannessy <[email protected]> Co-authored-by: Olexandr Radovenchyk <[email protected]> Co-authored-by: Edgardo Avilés-López <[email protected]> Co-authored-by: Matan Borenkraout <[email protected]> Co-authored-by: Rick Hanlon <[email protected]> Co-authored-by: Rajhans Jadhao <[email protected]> Co-authored-by: Ricky <[email protected]> Co-authored-by: Orta Therox <[email protected]>
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 topackage.json
. This fixes that by adding the dependency.