classtranscribe / classtranscribe/FrontEnd

Fix @babel/plugin-proposal-private-property-in-object errors

Open
#819 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
24
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Looks like [@babel/plugin-proposal-private-property-in-object](https://www.npmjs.com/package/@babel/plugin-proposal-private-property-in-object) is deprecated and to be replaced with [@babel/plugin-transform-private-property-in-object](https://www.npmjs.com/package/@babel/plugin-transform-private-property-in-object).

Honestly I'm not sure how much we use it, so I'd be glad to not have this warning every time, but I haven't looked into it. Here's what warning we get when running a build:

```
Creating an optimized production build...
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.
```

Adding it in dev dependencies didn't make the warnings go away, maybe migrating over or removing this somehow might be the move.

Relevant links:

https://babeljs.io/docs/babel-plugin-transform-private-property-in-object

https://stackoverflow.com/questions/76435306/babel-preset-react-app-is-importing-the-babel-plugin-proposal-private-propert

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Reproduce the warning with the production build, then inspect the package manifest and build configuration to determine whether the deprecated plugin is used directly or only through babel-preset-react-app. Done means the warning is gone and the production build still succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.