I created a React application usingnpx create-react-app my_appbut when I run the application usingnpm startI get the following error,
I tried to usenpm install @babel/plugin-proposal-private-property-in-objectto install the package "@babel/plugin-proposal-private-property-in-object", but still encountered to the same error. how to solve this problem?
This is what worked for mebabel packagecombination:
"devDependencies": { "@babel/core": "7.22.5", "@babel/eslint-parser": "7.22.5", "@babel/plugin-proposal-private-property-in-object": "7.21.11", "@babel/preset-env": "7.22.5", }Important Steps
Add
@babel/plugin-proposal-private-property-in-objectto.babelrc plugin.Things like this:
"plugins": [ ["@babel/plugin-proposal-private-property-in-object", { "loose": true }] ]