I had the same problem, but I was able to get it working by running npm install --save-dev @babel/plugin-proposal-decorators and adding ["@babel/plugin-proposal-decorators", { "legacy": true }] to the plugins section in my .babelrc.
The plugins section of .babelrc, for me, now looks like this:
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
Answer from Christopher Bradshaw on Stack OverflowI had the same problem, but I was able to get it working by running npm install --save-dev @babel/plugin-proposal-decorators and adding ["@babel/plugin-proposal-decorators", { "legacy": true }] to the plugins section in my .babelrc.
The plugins section of .babelrc, for me, now looks like this:
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
First, execute the command:
npm install customize-cra react-app-rewired @babel/plugin-proposal-decorators --save
Create a new file config-overrides.js at project root and then execute the following:
const { override, addDecoratorsLegacy } = require('customize-cra');
module.exports = override(
addDecoratorsLegacy()
);
Also, edit your package.jsonfile :
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject"
},
then restart.
» npm install @trivago/prettier-plugin-sort-imports
» npm install @ianvs/prettier-plugin-sort-imports
» npm install @plasmohq/prettier-plugin-sort-imports