When the React application is running, the module '@babel/plugin-proposal-private-property-in-object' cannot be found.
P粉258788831
P粉258788831 2023-11-03 17:03:48
0
1
827

I created a React application using npx create-react-app my_app but when I run the application using npm start I get the following error,

I tried to use npm install @babel/plugin-proposal-private-property-in-object to install the package "@babel/plugin-proposal-private-property-in-object", but still encountered to the same error. how to solve this problem?

P粉258788831
P粉258788831

reply all(1)
P粉078945182

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-object to .babelrc plugin.

Things like this:

"plugins": [
    ["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
]
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template