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
In package.json
"dependencies": {
"@babel/compat-data": "7.8.0",
"@babel/plugin-proposal-numeric-separator": "^7.8.3",
"babel-loader": "^8.1.0",
....
"resolutions": {
"@babel/preset-env": "^7.8.7"
}
it is working for me. You can read more
https://github.com/angular/angular-cli/issues/17262#issuecomment-603396857
You can use this command, which has worked for me.
npm i @babel/compat-data@7.8.0
This worked for me:
package-lock.json
node_modules
npm i
I'm using angular & this worked for me, simply changed the version of @babel/compat-data from ^7.8.0
to just 7.8.0
, the package-lock.json is having newer version which has bugs.
Inside package.json:
"devDependencies": {
"@babel/compat-data": "7.8.0",
}
Add SKIP_PREFLIGHT_CHECK=true to .env file to make the build work without ejecting and follow the below steps:
node_modules
and package-lock.json
"resolutions": { "@babel/preset-env": "^7.8.7" }
to package.json
npm install npm-force-resolutions --save-dev
npm install
npx npm-force-resolutions
npm install
againnpm run build
Reference: https://github.com/angular/angular-cli/issues/17262
I found two solution
a ) Install babel compat
"devDependencies": {
"@babel/compat-data": "7.8.0",
}
b) Install plugin-proposal-numeric-separator
npm install --save-dev @babel/plugin-proposal-numeric-separator
install this version only 7.8.0
Angular CLI can create this kind of issue. Go to package json and change it to
build-angular": "0.803.17"
please don't add ^ or ~ .