Error | Could not find plugin "proposal-numeric-separator" | Generating ES5 bundles for differential loading
π Bug report
Command (mark with an x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
Yes, the previous version in which this bug was not present was: a few hours agoDescription
A clear and concise description of the problem...Build doesn't work
π¬ Minimal Reproduction
npm install
node --max-old-space-size=4096 ./node_modules/@angular/cli/bin/ng build --prod
π₯ Exception or Error
Generating ES5 bundles for differential loading...
An unhandled exception occurred: [BABEL] C:\angular\dist\common-es2015.b1722ef05b43f664abc2.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "C:\\angular\\node_modules\\@angular-devkit\\build-angular\\node_modules\\@babel\\preset-env\\lib\\index.js")
See "C:\Users\Vegard\AppData\Local\Temp\ng-J7YoSB\angular-errors.log" for further details.
π Your Environment
Angular CLI: 8.3.25
Node: 12.14.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic
... platform-webworker, platform-webworker-dynamic, router
... service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.25
@angular-devkit/build-angular 0.803.25
@angular-devkit/build-optimizer 0.803.25
@angular-devkit/build-webpack 0.803.25
@angular-devkit/core 8.3.25
@angular-devkit/schematics 8.3.25
@angular/cdk 8.2.3
@angular/cli 8.3.25
@angular/material 8.2.3
@angular/pwa 0.803.25
@ngtools/webpack 8.3.25
@schematics/angular 8.3.25
@schematics/update 0.803.25
rxjs 6.5.4
typescript 3.5.3
webpack 4.39.2
Anything else relevant?
https://github.com/facebook/create-react-app/issues/8680
Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.
This is don't work for me...
Hi, all @vegarda, @dex252 I have the issue as well, but i managed to find single working set of package(s)
"@angular-devkit/build-angular": "^0.803.23",
"@angular/cli": "~8.3.22",
I believe the you need to use lower version of @angular-devkit/build-angular rather then 0.803.25
I was able to build by disabling generating ES5 bundles for differential loading by setting
"browserslist": [
"last 2 Chrome versions"
]
in packages.json, and
"es5BrowserSupport": false
in angular.json
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.
This also worked for me. I was getting this error when building an image for an Angular 8 Universal app with docker. I also followed the steps listed in this react thread to use npm resolutions. https://github.com/facebook/create-react-app/issues/8680. Not sure if the resolutions step is needed because it wasn't until I added @babel/compat-data to my devDependencies that the issue was resolved. I would first just try adding @babel/compat-data to devDependencies.
Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.
This also worked for me. I want to add that the error didn't show up locally, but only when i used Azure Devops. I think DevOps bumps up the babel versions
"@babel/compat-data": "~7.8.0"
This also worked for me. Be sure to use exactly this version. Pay attention to the version. Firstly I automatically installed "@babel/compat-data": "^7.9.0" - this didn't work
@judedaryl this could be also related to package-lock.json - if it's ignored (eg using npm i instead of npm ci) then remote CI could be affected by this issue.
just installing "@babel/compat-data": "7.8.0" didn't work for me. I had to delete the package-lock.json file
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.This is don't work for me...
Sticking to previous version of build-angular just do the work without any other change (and "@babel/compat-data": "7.8.0" did not work for me, with or without removing the lock)
"devDependencies": {
"@angular-devkit/build-angular": "=0.803.22",
...
}
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.
This worked for me. Is this considered a temporary solution? Should we keep a watch on this and remove it later?
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.
Rocks!
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.
Worked for me!! Do we need to remove it manually after the fix or will be handled in the internal devDependencies?
@morinellipy @gs-nchakravarthi yes, we need to keep this only until issue will be fixed. Then it will be needed to remove @babel/compat-data dependency from host website and update @angular-devkit/build-angular (see https://github.com/angular/angular-cli/pull/17267)
"@babel/compat-data": "~7.8.0" suggestion from the comment above solved the problem. I believe it will be fixed soon since the issue has been reported yesterday.
"@babel/compat-data": "~7.8.0"
this(npm i @babel/[email protected]) works for me! thanks @keitoaino
Thanks men this is also work for me
Try to install
"@babel/compat-data": "~7.8.0"todevDependencies. This is the only workaround which helped me.This also worked for me. I was getting this error when building an image for an Angular 8 Universal app with docker. I also followed the steps listed in this react thread to use npm resolutions. facebook/create-react-app#8680. Not sure if the resolutions step is needed because it wasn't until I added @babel/compat-data to my devDependencies that the issue was resolved. I would first just try adding @babel/compat-data to devDependencies.
I'm using nrwl workspace with angular@^8.2.0(the angular cli version is 8.3.14 in the yarn.lock) and I having the same issue.
I've tried all the work arounds under this thread and none of them works for me, not until I tried adding resolutions in my package.json file.
"resolutions": {
"@babel/preset-env": "^7.8.7"
},
See: create-react-app Issue #8860
I hope this will help someone who still having issue after trying all above, like me. And I'm looking forward for the fix.
The problem is preseent also with angular 8
[INFO] Generating ES5 bundles for differential loading...
[INFO] An unhandled exception occurred: [BABEL] /var/lib/jenkins/workspace/dgkoro1_0/dg-suite-client/dist/dg-suite/polyfills-es5.42ee81f782be21ac5c8b.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/var/lib/jenkins/workspace/dgkoro1_0/dg-suite-client/node_modules/@babel/preset-env/lib/index.js")
[INFO] See "/tmp/ng-QZa8t9/angular-errors.log" for further details.
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! syscall spawn
[INFO] npm ERR! file sh
[INFO] npm ERR! errno ENOENT
[INFO] npm ERR! [email protected] build-svil: ng build --configuration=svil && node usestrictfixer.js
[INFO] npm ERR! spawn ENOENT
[INFO] npm ERR!
[INFO] npm ERR! Failed at the [email protected] build-svil script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! /var/lib/jenkins/.npm/_logs/2020-03-23T07_48_51_372Z-debug.log
Use these Steps to Fix the Issue
-
delete node_modules and package-lock.json
-
add "resolutions": { "@babel/preset-env": "^7.8.7" } to package.json
-
npm install npm-force-resolutions --save-dev -
npm install -
npx npm-force-resolutions -
npm installagain -
ionic build,ionic cordova run android