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
703

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?

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-objectto.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
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!