Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vegarda opened this issue Mar 20, 2020 · 65 comments

Comments

@vegarda
Copy link

@vegarda vegarda commented Mar 20, 2020

馃悶 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 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?

facebook/create-react-app#8680

@keitoaino

This comment has been minimized.

Copy link

@keitoaino keitoaino commented Mar 20, 2020

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

@ngbot ngbot bot modified the milestone: Backlog Mar 21, 2020
clydin added a commit to clydin/angular-cli that referenced this issue Mar 21, 2020
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 pinned as they are transitive dependencies of the packages adjusted in this commit.  This failure will prevent a newly generated project from building and can only be worked around by disabling differential loading.

Fixes: angular#17262
@dex252

This comment has been minimized.

Copy link

@dex252 dex252 commented Mar 21, 2020

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

This is don't work for me...

@azhukov87

This comment has been minimized.

Copy link

@azhukov87 azhukov87 commented Mar 21, 2020

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

@vegarda

This comment has been minimized.

Copy link
Author

@vegarda vegarda commented Mar 21, 2020

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

@mattcwebster

This comment has been minimized.

Copy link

@mattcwebster mattcwebster commented Mar 21, 2020

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 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.

@judedaryl

This comment has been minimized.

Copy link

@judedaryl judedaryl commented Mar 21, 2020

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

@OyebisiJemil

This comment has been minimized.

Copy link

@OyebisiJemil OyebisiJemil commented Mar 21, 2020

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

this(npm i @babel/compat-data@7.8.0) works for me! thanks @keitoaino

@SergeyMell

This comment has been minimized.

Copy link

@SergeyMell SergeyMell commented Mar 21, 2020

"@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

@keitoaino

This comment has been minimized.

Copy link

@keitoaino keitoaino commented Mar 21, 2020

@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.

@farajfarook

This comment has been minimized.

Copy link

@farajfarook farajfarook commented Mar 21, 2020

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" to devDependencies. This is the only workaround which helped me.

This is don't work for me...

@raffienficiaud-pix4d

This comment has been minimized.

Copy link

@raffienficiaud-pix4d raffienficiaud-pix4d commented Mar 21, 2020

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

This comment has been minimized.

Copy link

@morinellipy morinellipy commented Mar 21, 2020

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. 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?

@zraees

This comment has been minimized.

Copy link

@zraees zraees commented Mar 21, 2020

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

Rocks!

@gs-nchakravarthi

This comment has been minimized.

Copy link

@gs-nchakravarthi gs-nchakravarthi commented Mar 22, 2020

Try to install "@babel/compat-data": "~7.8.0" to devDependencies. 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?

@keitoaino

This comment has been minimized.

Copy link

@keitoaino keitoaino commented Mar 22, 2020

@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 #17267)

@gustavohks2

This comment has been minimized.

Copy link

@gustavohks2 gustavohks2 commented Mar 22, 2020

"@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.

@vajidaliji

This comment has been minimized.

Copy link

@vajidaliji vajidaliji commented Mar 22, 2020

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

this(npm i @babel/compat-data@7.8.0) works for me! thanks @keitoaino

Thanks men this is also work for me

@Roman-Lo

This comment has been minimized.

Copy link

@Roman-Lo Roman-Lo commented Mar 22, 2020

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 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.

@lchiesa2000

This comment has been minimized.

Copy link

@lchiesa2000 lchiesa2000 commented Mar 23, 2020

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! dg-suite@0.0.0 build-svil: ng build --configuration=svil && node usestrictfixer.js
[INFO] npm ERR! spawn ENOENT
[INFO] npm ERR!
[INFO] npm ERR! Failed at the dg-suite@0.0.0 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

shiroyuki added a commit to DNAstack/ddap-explore that referenced this issue Mar 25, 2020
鈥), and beacon app; and resolved regression introduced by babel/compat-data (angular/angular-cli#17262)

Aggregated commits from 2020.03.03 to 2020.03.20

- Support for coronavirus app
- Preliminary support for Google Maps
- Added the condition to hide the app switcher if there is only one accessible app
- Implemented the condition to hide the sidebar if there is only one submodule available
- Preliminary support for Bing Maps
- Moved terms into its own menu
- Nextstrain integration and small style fixes
- Added attribution for GISAID
- Added attribution of NGDC
- Parameterized COVID Beacon Url
- Ensured that the first query is triggered on initialization
- Preliminary UX updates
- Synchronize query params with URL and initiate search automatically
- Make mouse a hand over clickable rows
- Fixed the error/warning on bi-directional binding, unused reference, hid the info panel by default, and make the button explicitly do something (instead of 'toggle')
- Do search on enter
- When the search starts, deactivate the search box
- Dynamically set mobile state if necessary
- Turn off pagination on mobile
- Reduced self-referencing and local variables and ensure that when the row is selected, the details panel is automatically displayed.
- When the user clicks on a row (cell), the info panel is auto-displayed.
- Replaced how the sidebar is able from relying on the number of submodules to the property of the module metadata.
- Added the test for Workflow Registry
- Added the test for COVID-19 beacon
- Removed the default title. (COVID-23)
- Implemented Google Analytics by injecting to <head> (COVID-8)
- Introduced dynamic theme (COVID-20)
@pixael

This comment has been minimized.

Copy link

@pixael pixael commented Mar 25, 2020

I only had to do:
npm i @babel/compat-data@7.8.0
works like a charm. Thanks to @keitoaino.

@pehfernandesl

This comment has been minimized.

Copy link

@pehfernandesl pehfernandesl commented Mar 26, 2020

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

steve-todorov added a commit to strongbox/strongbox-web-ui that referenced this issue Mar 27, 2020
@unnhao

This comment has been minimized.

Copy link

@unnhao unnhao commented Mar 27, 2020

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
@adiediekdo

This comment has been minimized.

Copy link

@adiediekdo adiediekdo commented Mar 27, 2020

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

this(npm i @babel/compat-data@7.8.0) works for me! thanks @keitoaino

works for me to, thanks

@yusufali19

This comment has been minimized.

Copy link

@yusufali19 yusufali19 commented Mar 27, 2020

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

@barryguda-1

This comment has been minimized.

Copy link

@barryguda-1 barryguda-1 commented Mar 27, 2020

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

@yanestevesufjf

This comment has been minimized.

Copy link

@yanestevesufjf yanestevesufjf commented Mar 27, 2020

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

works for me too.

@wzoccarato

This comment has been minimized.

Copy link

@wzoccarato wzoccarato commented Mar 27, 2020

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

This worked for me too

@pimol

This comment has been minimized.

Copy link

@pimol pimol commented Mar 27, 2020

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.

@ozzpy

This comment has been minimized.

Copy link

@ozzpy ozzpy commented Mar 27, 2020

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.

@cat0rgi0

This comment has been minimized.

Copy link

@cat0rgi0 cat0rgi0 commented Mar 27, 2020

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

Worked

@rk-2903

This comment has been minimized.

Copy link

@rk-2903 rk-2903 commented Mar 27, 2020

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

@alexlarraga1

This comment has been minimized.

Copy link

@alexlarraga1 alexlarraga1 commented Mar 28, 2020

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

@id1945

This comment has been minimized.

Copy link

@id1945 id1945 commented Mar 28, 2020

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

Thanks you! 馃憤 馃 馃

@robertrypula

This comment has been minimized.

Copy link

@robertrypula robertrypula commented Mar 29, 2020

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...

"resolutions": {
    "@babel/preset-env": "^7.8.7"
},

...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 :P

@SaraSultanLearn

This comment has been minimized.

Copy link

@SaraSultanLearn SaraSultanLearn commented Mar 29, 2020

with me none of previous solutions solved my issue:
Just Update Angular-cli in global and also update Node , npm
and create another new Project works fine :)

@phantomk

This comment has been minimized.

Copy link

@phantomk phantomk commented Mar 30, 2020

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

worked for me, mac and docker(centos)

sebinbenjamin added a commit to Quarantined-Help/quarantined-hybrid-app that referenced this issue Mar 30, 2020
@pcaserta

This comment has been minimized.

Copy link

@pcaserta pcaserta commented Mar 30, 2020

Make sure you hit npm install before rebuilding your app, or the actual version won't be installed

@virtualvishwam

This comment has been minimized.

Copy link

@virtualvishwam virtualvishwam commented Mar 30, 2020

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

Where exactly to add these inside angular.json and package.json?
I am a bit new to all this.

Also installing "@babel/compat-data": "7.8.0" did not work for me.

I am using Ionic App

lonesomegeek pushed a commit to lonesomegeek/LSG.GenericCrud that referenced this issue Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can鈥檛 perform that action at this time.