create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

dependencies are borked; will matter when deprecation kicks in

Open felzix opened this issue 2 years ago • 2 comments

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.

felzix avatar Feb 02 '24 21:02 felzix

literally got this exact same thing in the console lol

SeizureSaladd avatar Feb 03 '24 02:02 SeizureSaladd

I've been facing this issue too in my project (https://github.com/classtranscribe/FrontEnd/issues/819). CRA has included a fix in a commit around a year ago: https://github.com/facebook/create-react-app/commit/0f5e990b8a04f53861d64ff53751517bbf73d867, but there's been no release since then.

Looks like @babel/plugin-proposal-private-property-in-object is deprecated and to be replaced with @babel/plugin-transform-private-property-in-object. Babel's website babel-plugin-transform-private-property-in-object docs says

This plugin is included in @babel/preset-env, in ES2022

Here's the link to the package.json for babel-preset-react-app in CRA that's declares the dependency too.

harsh183 avatar Jun 09 '24 21:06 harsh183