I created a react project using create-react-app.
Now when I add a certain dependency in package.json I get an error after running npm start:
Support for the experimental syntax 'classProperties' isn't currently enabled.
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.
I tried to use npm run eject and then do npm install --save-dev @babel/plugin-proposal-class-properties but that is not working even if I update the babel part in the package.json with:
"babel": {
"presets": [
"react-app"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
What am I missing? I tried the solutions already proposed in this forum but they are not working. Thanks