How to fix Could not find plugin \"proposal-numeric-separator\"
, I get this error when I try to build my React application, I have not ejected the application y
Try this, it works: npm i @babel/compat-data@7.8.0
I have just used it like 10 minutes ago, and it's working fine.
Related issue going on github about this. Click Here!
worked for me. npm install @babel/compat-data@~7.8.0
I just had this happen to me. The To fix it I ran yarn build
with sudo privileges.
Why this problem happened?:
It's an issue of conflicts between internal packages used by babel
.
Adding a new plugin to @babel/compat-data
breaks old @babel/preset-env
versions. This is because preset-env
iterates over compat-data
's plugins, and throws if the plugin isn't defined in preset-env's available-plugins.js
file.
This is the merge that fixed the issue: https://github.com/babel/babel/pull/11201/files/a88a00750c61ff89f1622d408d67108719f21ecd
Solution:
package-lock.json
or yarn.lock
node_modules
folderpackage.jon
I have adjusted the version numbers of these packages to: ...
"devDependencies": {
"@babel/compat-data": "^7.8.0",
"@babel/preset-env": "^7.8.0",
"babel-loader": "^8.1.0",
...
},
...
"resolutions": {
"@babel/preset-env": "^7.8.0"
}
npm install
npm run build
I faced similar issue and i was able to fix it by updating all babel dependencies to latest version. I'm not aware of the exact issue with babel. However, the below mentioned step worked for me.
Step 1: identify and remove all babel related dependencies from package.json
npm remove @babel/runtime @babel/core @babel/plugin-proposal-class-properties @babel/plugin-transform-modules-commonjs @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react babel-eslint babel-jest babel-loader
Step 2: re-install babel dependencies
npm install --save @babel/runtime
npm install --save-dev @babel/core @babel/plugin-proposal-class-properties @babel/plugin-transform-modules-commonjs @babel/plugin-transform-runtime @babel/preset-env @babel/preset-react babel-eslint babel-jest babel-loader
PS: The above list of babel dependencies will differ for your project.
In my case I've got a corrupted node_modules
folder.
My yarn install simply stopped in the middle by a power surge.
By running:
rm -rf node_modules
yarn
My problem was solved.