angular-cli: Error | Could not find plugin "proposal-numeric-separator" | Generating ES5 bundles for differential loading
🐞 Bug report
Command (mark with an x
)
- new
- 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?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 54
- Comments: 85 (1 by maintainers)
Commits related to this issue
- fix(@angular-devkit/build-angular): update babel to 7.8.7 Babel versions 7.8.0-7.8.6 contain a defect that can cause failures due to babel plugin changes (even in patch versions). Plugins are not pi... — committed to clydin/angular-cli by clydin 4 years ago
- fix(@angular-devkit/build-angular): update babel to 7.8.7 Babel versions 7.8.0-7.8.6 contain a defect that can cause failures due to babel plugin changes (even in patch versions). Plugins are not pi... — committed to clydin/angular-cli by clydin 4 years ago
- Manually merge Data Explorer module, COVID-19 app (i.e., discovery app), and beacon app; and resolved regression introduced by babel/compat-data (https://github.com/angular/angular-cli/issues/17262) — committed to DNAstack/ddap-explore by shiroyuki 4 years ago
- Manually merge Data Explorer module, COVID-19 app (i.e., discovery app), and beacon app; and resolved regression introduced by babel/compat-data (https://github.com/angular/angular-cli/issues/17262) ... — committed to DNAstack/ddap-explore by shiroyuki 4 years ago
- fix(@angular-devkit/build-angular): update babel to 7.8.7 Babel versions 7.8.0-7.8.6 contain a defect that can cause failures due to babel plugin changes (even in patch versions). Plugins are not pi... — committed to angular/angular-cli by clydin 4 years ago
- Add workaround for an angular-cli issue that blocks building Issue link: https://github.com/angular/angular-cli/issues/17262 Workaround: Add "@babel/compat-data": "~7.8.0" to devDependencies in pack... — committed to MyDataTaiwan/mylog14 by deleted user 4 years ago
- Manually merge Data Explorer module, COVID-19 app (i.e., discovery app), and beacon app; and resolved regression introduced by babel/compat-data (https://github.com/angular/angular-cli/issues/17262) ... — committed to DNAstack/ddap-explore by shiroyuki 4 years ago
- Fixing build error related to bug in a dependant package (https://github.com/angular/angular-cli/issues/17262 ) — committed to SAP-samples/cloud-commerce-sample-setup by tylermac-sap 4 years ago
- Manually merge Data Explorer module, COVID-19 app (i.e., discovery app), and beacon app; and resolved regression introduced by babel/compat-data (https://github.com/angular/angular-cli/issues/17262) ... — committed to DNAstack/ddap-explore by shiroyuki 4 years ago
- issue-1704: angular/angular-cli#17262 — committed to strongbox/strongbox-web-ui by steve-todorov 4 years ago
- fix the build. see https://github.com/angular/angular-cli/issues/17262 — committed to kfiri/emberspage-old by deleted user 4 years ago
- Fixes build:prod error Could not find plugin "proposal-numeric-separator" - https://github.com/angular/angular-cli/issues/17262#issuecomment-605638883 — committed to robertrypula/rr-shop-fe by robertrypula 4 years ago
- fix: temporary Angular CLI issue workaround https://github.com/angular/angular-cli/issues/17262#issuecomment-601950707 — committed to Quarantine-Help/quarantine-help-hybrid by sebinbenjamin 4 years ago
- fix the problem of ng build (origin: https://github.com/angular/angular-cli/issues/17262 ) — committed to WuYouyan/recruitment-tests by WuYouyan 4 years ago
- adding babel to let ng build complete, bug documented here: https://github.com/angular/angular-cli/issues/17262 — committed to lonesomegeek/LSG.GenericCrud by deleted user 4 years ago
- fix the build. see https://github.com/angular/angular-cli/issues/17262 — committed to kfiri/emberspage-old by deleted user 4 years ago
- issue-1694: Updating dependencies (angular/angular-cli#17262) — committed to aosousa/strongbox-web-ui by rljoia 4 years ago
- Work/duge/92 (#140) * before merging with default vanilla project * working version bug outdated * working version with ng8, ag-grid and netcore3.1 * adding database location and themes to a... — committed to lonesomegeek/LSG.GenericCrud by lonesomegeek 4 years ago
- Fix build exception: Could not find plugin "proposal-numeric-separator" Ran: npm i @babel/compat-data@7.8.0 See: https://github.com/angular/angular-cli/issues/17262#issuecomment-602069236 Note that ... — committed to govmeeting/govmeeting by johnpankowicz 4 years ago
- Work/duge/92 (#144) * before merging with default vanilla project * working version bug outdated * working version with ng8, ag-grid and netcore3.1 * adding database location and themes to a... — committed to lonesomegeek/LSG.GenericCrud by lonesomegeek 4 years ago
Try to install
"@babel/compat-data": "~7.8.0"
todevDependencies
. This is the only workaround which helped me.this(npm i @babel/compat-data@7.8.0) works for me! thanks @keitoaino
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)CHANGING
"@angular-devkit/build-angular": "^0.803.25"
TO"@angular-devkit/build-angular": "0.803.23"
worked for me
This is don’t work for 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.
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 workFor anyone experiencing this issue, Angular CLI 8.3.26 has been released with an update to the babel versions. No workarounds should be necessary after an update. When updating, please ensure that the
@angular-devkit/build-angular
package was also updated to 0.803.26. This package contains the majority of the build logic for the CLI.If anyone is still encountering issues after an update, please open a new issue with details regarding your environment and project versions.
WORKARROUND On package.json add
run
npx npm-force-resolutions
then runnpm install
oryarn
then runnpm build
oryarn build
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
I only had to do:
npm i @babel/compat-data@7.8.0
works like a charm. Thanks to @keitoaino.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.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.
Verified that it was a Babel bug introduced 3 days ago. https://github.com/babel/babel/pull/11201 https://www.npmjs.com/package/@babel/preset-env Lock down the versions of Babel’s packages using the tilde instead of the caret:
"dependencies": { "@babel/preset-env": "~7.8.7", "@babel/compat-data": "~7.8.6",
working
not working
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
1.delete node_modules and package-lock.json 2.add “resolutions”: { “@babel/preset-env”: “^7.8.7” }, to package.json 3.npm install npm-force-resolutions --save-dev 4.npm install 5.npx npm-force-resolutions 6.npm install again 7.then run your app
https://forum.ionicframework.com/t/how-to-resolve-babel-error-when-installing-geolocation-in-ionic-app/185542/3
Try this, this works: npm i @babel/compat-data@7.8.0
This worked for me. No problem with angular ng build.
Same here
I’ve tried all the various suggestions listed above and none of them are working for me.
Contents of package.json
And I still end up with the same error
Helped me as well.
got this error while running ng build. Solution
I’m working with Yarn 1.22.4 and Angular 8.2.14 on Windows 10. Problem started to occur when I installed ngx-markdown 9.0.0. I had some TypeScript related issue so I downgraded ngx-markdown to 8.2.2. After that I started to get proposal-numeric-separator errors. In my case adding ONLY this…
…to the package.json worked. Probably I also removed yarn-lock and node_modules before installing packages once more time (I spent “magic” 1.5h of frustration…). At the same time I “destroyed” my Ubuntu 18.04 VPS . It was working fine on commits before installing ngx-markdown. Nothing was helping - resetting repository to the commit from the past, deleting node_modules, yarn.lock or even upgrading node or yarn versions 😉 Looks like when it’s broken it’s remains broken no matter what you do 😛
Thanks you! 👍 🥇 🥇
Worked
This also worked for me on the first try. Thank you for the solution!
Tried this and work on first try
stchln, I didn’t need to do all the extra steps that Lakshitha did (although I tried and it didn’t work for me) I just updated the dependencies in the package.config. The tilde’s are what’s important. The caret will allow the versions to go up to minor 7.9.999 (which is where the problem is, minor version 9) where the tilde only allows the patch version to increase up to 7.8.999… You could also remove the tilde and caret completely until Babel gets a fix deployed. Hope this helps.
Thank god. This works. Angular Team please help in fixing this issue from angular cli end.
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 install
againionic build
,ionic cordova run android
@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)Worked for me!! Do we need to remove it manually after the fix or will be handled in the internal devDependencies?
Rocks!
just installing
"@babel/compat-data": "7.8.0"
didn’t work for me. I had to delete thepackage-lock.json
file