-
-
Notifications
You must be signed in to change notification settings - Fork 27k
babel-preset-react-app dependency error - Yarn 3 #11793
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
Comments
Thanks @Mezzle for reporting, we likely need to add |
#11751 seems like it will fix this. |
+1 |
Thanks! #11751 is added to 5.0.1 milestone |
Is there a temporary fix for this, it seems I cannot use CRA with yarn workspaces currently |
Add to your .yarnrc.yml: packageExtensions:
babel-preset-react-app@*:
dependencies:
"@babel/plugin-proposal-private-property-in-object": "*" |
In addition to what @llimos said, you also need to run |
why not just "yarn add @babel/plugin-proposal-private-property-in-object" ? |
Because that doesn't resolve the warning. That adds it to your package.json, which - as the error states - makes the import ambiguous and unsound. |
Added this to my nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.1.1.cjs Seems to have resolved it |
This issue seems to be solved for us after upgrading create-react-app to 5.0.1 (and yarn to 3.3.1). We have previously used solution provided by Ilimos (#11793 (comment)). Now yarn start & yarn build works for us with that workaround removed from .yarnrc.yml. |
One of your dependencies, babel-preset-react-app, is importing the babel-preset-react-app is part of the create-react-app project, which Add "@babel/plugin-proposal-private-property-in-object" to your How to resolve it |
Hi. How is that CRA is not maintained anymore? You are writing in CRA issues list :-D |
Thanks
…On Mon, Jun 5, 2023 at 9:34 PM trohr ***@***.***> wrote:
One of your dependencies, babel-preset-react-app, is importing the
***@***.***/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
***@***.***/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 maintained anymore. It is thus unlikely that this bug will ever be
fixed. If you are starting a new project, you may consider using maintained
alternatives such as Vite (https://vitejs.dev/) instead.
Add ***@***.***/plugin-proposal-private-property-in-object" to your
devDependencies to work around this error. This will make this message go
away.
How to resolve it
Hi. How is that CRA is not maintained anymore? You are writing in CRA
issues list :-D
Isn't this just some advertisement of the Vite project? :D
—
Reply to this email directly, view it on GitHub
<#11793 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUL3RSRQL3EWOVPEIVFFQZTXJX7RHANCNFSM5KJPM6WQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
NGATTFPVV |
Describe the bug
When attempting to use create-react-app with yarn 3, running the scripts returns the following error
Did you try recovering your dependencies?
3.1.1
Which terms did you search for in User Guide?
N/A
Environment
Steps to reproduce
Expected behavior
App would start
Actual behavior
Multitude of errors, including the above regarding issue with dependency (others are resolvable by adding the dependencies manually)
Reproducible demo
https://github.com/Mezzle/cra-yarn-bug-example
The text was updated successfully, but these errors were encountered: