angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Error | Could not find plugin "proposal-numeric-separator" | Generating ES5 bundles for differential loading

Open vegarda opened this issue 6 years ago β€’ 85 comments

🐞 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 ago

Description

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

vegarda avatar Mar 20 '20 21:03 vegarda

Try this, this works: npm i @babel/[email protected]

devexpert9 avatar Mar 25 '20 06:03 devexpert9

DONE compiled pbiviz after applying the « resolutions » from datazen + manual installation of @babel/plugin-proposal-numeric-separator Thanks all

ghost avatar Mar 25 '20 07:03 ghost

Try this, this works: npm i @babel/[email protected]

This worked for me as well. Tried all others but this was the one successfully executed. Have been banging my head from past 6-7 hours before landed here. Thank you.

WahabShah23 avatar Mar 25 '20 12:03 WahabShah23

@babel/comap-data didn't help on my machine. Manually referencing the numeric-separator package into the @babel/preset-env/lib/available-plugins.js fixed the error. var _pluginNumeric = _interopRequireDefault(require("@babel/plugin-proposal-numeric-separator")); "proposal-numeric-separator": _pluginNumeric.default,

astaev avatar Mar 25 '20 14:03 astaev

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

Forcing version of "@angular-devkit/build-angular" to 0.803.22 fixed the issue also in my env, "@babel/compat-data": "~7.8.0" didn't work

vigan-abd avatar Mar 25 '20 14:03 vigan-abd

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.

It's also worked for me thanks!

okandavut avatar Mar 25 '20 14:03 okandavut

I only had to do: npm i @babel/[email protected] works like a charm. Thanks to @keitoaino.

pixael avatar Mar 25 '20 22:03 pixael

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.

This worked to me.

Angular CLI: 8.3.25 Node: 12.16.1 OS: linux x64 Angular: 8.2.14

@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/cli 8.3.25 @ngtools/webpack 8.3.25 @schematics/angular 8.3.25 @schematics/update 0.803.25 rxjs 6.4.0 typescript 3.5.3 webpack 4.39.2

phlxz avatar Mar 26 '20 15:03 phlxz

I remove whole node_modules which installed with ng new, and run npm install again.

Angular CLI: 8.3.25
Node: 10.17.0
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms     
... language-service, platform-browser, platform-browser-dynamic
... router

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/cli                      8.3.25
@ngtools/webpack                  8.3.25
@schematics/angular               8.3.25
@schematics/update                0.803.25
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2

haoolii avatar Mar 27 '20 04:03 haoolii

"@babel/compat-data": "~7.8.0"

this(npm i @babel/[email protected]) works for me! thanks @keitoaino

works for me to, thanks

adiediekdo avatar Mar 27 '20 06:03 adiediekdo

WORKARROUND On package.json add

  "resolutions": {
    "@babel/preset-env": "^7.8.7",
    "@babel/compat-data": "~7.8.0"
  }

run npx npm-force-resolutions then run npm install or yarn then run npm build or yarn build

Tried this and work on first try

iamyusufali avatar Mar 27 '20 07:03 iamyusufali

"devDependencies": { "babel/compat-data": "7.8.0", } This worked for me on first trial

barryguda-1 avatar Mar 27 '20 07:03 barryguda-1

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.

works for me too.

yanesteves avatar Mar 27 '20 07:03 yanesteves

"devDependencies": { "babel/compat-data": "7.8.0", }

This worked for me too

wzoccarato avatar Mar 27 '20 09:03 wzoccarato

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.

For me too, but only after I run ionic repair

P.

pimol avatar Mar 27 '20 10:03 pimol

work for me adding "@babel/compat-data": "7.8.0" and delete lock file, then npm i, after this I was able to run the app.

ozzpy avatar Mar 27 '20 11:03 ozzpy

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.

Worked

cat0rgi0 avatar Mar 27 '20 15:03 cat0rgi0

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me. Do:- npm i @babel/[email protected]

rk-2903 avatar Mar 27 '20 22:03 rk-2903

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",
    ...
}

This works for me

alexlarraga1 avatar Mar 28 '20 07:03 alexlarraga1

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. This is the only workaround which helped me.

Thanks you! :+1: :1st_place_medal: :1st_place_medal:

id1945 avatar Mar 28 '20 08:03 id1945