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’ll 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

Closed
1 of 15 tasks
vegarda opened this issue Mar 20, 2020 · 85 comments

Comments

@vegarda
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

@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
Copy link

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

@ghost
Copy link

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

@maurimorinelli
Copy link

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
Copy link

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
Copy link

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
Copy link

@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
Copy link

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

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

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
Copy link

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

@mirogrenda
Copy link

mirogrenda commented Mar 31, 2020

The following worked for me too:

  1. ADD "@babel/compat-data": "7.8.0" to package.json
  2. CLEAN node_modules
  3. DELETE package-lock.json
  4. RUN npm install
  5. RUN ng build

Code example (from package.json):

{
  "scripts": {
    // no change here
  },
  "dependencies": {
    // no change here
  },
  "devDependencies": {
    "@babel/compat-data": "7.8.0" // added
  }
}

@Fluuub
Copy link

Fluuub commented Mar 31, 2020

All above was not working for me.
What I did as a TEMPORARY solution (Hence ugly):
npm install install @babel/plugin-proposal-numeric-separator --save-dev

Then changed file (And that is what is ugly, because it won't work if you reinstall modules):
node_modules@babel\preset-env\lib\available-lugins.js

By adding:
var _pluginProposalNumericSeparator = _interopRequireDefault(require("@babel/plugin-proposal-numeric-separator"));

And at the bottom, in the _default array, adding:
"proposal-numeric-separator": _pluginProposalNumericSeparator

@vivek437
Copy link

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

this did not work for me as well.. but this did..

"devDependencies": {
"@babel/core": "^7.7.4",
}

@sethbergman
Copy link

CICD Use Case

  • I'm building an application on a GitLab instance and deploying to kubernetes.
  • The project is @angular/cli version 7.x.x and I want to use Node.js 12 in my Dockerfile.

I clone the repo to remove the package lock and the node_modules file / folder.

I add this suggestion from above to my package.json then do a quick install to generate a new package-lock.json, and then I modify my Dockerfile. This particular project doesn't require me to compile so I'm doing everything in the Dockerfile.

FROM  custom-registry/nodejs-devops:12-lts_v2.0.0 as node
WORKDIR /app
COPY . .
#################################################
RUN npm install && npx npm-force-resolutions
##################################################
ENV NODE_ENV=production
RUN npm run build

FROM custom-registry/nginx-devops:1.16-lts_v2.0.0
EXPOSE 8080
COPY --from=node /app/dist /usr/share/nginx/html

kfiri pushed a commit to kfiri/emberspage-old that referenced this issue Mar 31, 2020
@SemicolonStruggles
Copy link

Can confirm that manually adding "@babel/compat-data": "~7.8.0" to the devDependencies works.

You need to explicitly tell it to use version 7.8.0 (using ~ rather than ^) since any newer versions will not work.

@clydin
Copy link
Member

clydin commented Apr 1, 2020

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

@vegarda vegarda closed this as completed Apr 1, 2020
@SmadusankaB
Copy link

npm i @babel/compat-data@7.8.0 worked for me. Check the followings as well.

Results of ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 8.3.25
Node: 10.16.3
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````

@UsmanAhmad888
Copy link

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

works for me too (Y) thanks

@devsandro
Copy link

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

npm i @babel/compat-data@7.8.0 this worked fine. thanks

@Johannes-LAMK
Copy link

I had the same problem, when building angular app. I just updated my packages and then it worked.

@anantkumar323
Copy link

anantkumar323 commented Apr 7, 2020

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

rljoia added a commit to aosousa/strongbox-web-ui that referenced this issue Apr 10, 2020
lonesomegeek added a commit to lonesomegeek/LSG.GenericCrud that referenced this issue Apr 11, 2020
* 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 aggrid

* tests with wsl2

* adding new docker commands for wsl

* adding babel to let ng build complete, bug documented here: angular/angular-cli#17262

* working version with vscode debugger

* adding objects and shares controller

* adding contact controller

* remove item controller, new tables

* working objects FE and BE

* adding generic crud historical, missing generic service layer

* adding release notes and breaking changes

* merge conflict

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>
@kaelwebdev
Copy link

I solved this problem as follows:

"devDependencies": {
    "@angular-devkit/architect": "~0.801.2",
    ...

in package.json.
then I did npm install to apply the changes.

@gokul-ch-pandey
Copy link

got this error while running ng build.
Solution

  1. add "@babel/compat-data": "~7.8.0" to devDependencies.
  2. npm install

johnpankowicz added a commit to govmeeting/govmeeting that referenced this issue Apr 20, 2020
Ran: npm i @babel/compat-data@7.8.0
See: angular/angular-cli#17262 (comment)

Note that 2 commits ago, I tried to fix 2 critical npm audit vulnerbilities'
The fix involved upgrading to @angular-devkit/build-angular@0.901.1/
But then caused a compile error which was fixed by doing this:
npm install --save-dev  @angular-devkit/build-angular@0.803.24
lonesomegeek added a commit to lonesomegeek/LSG.GenericCrud that referenced this issue Apr 21, 2020
* 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 aggrid

* tests with wsl2

* adding new docker commands for wsl

* adding babel to let ng build complete, bug documented here: angular/angular-cli#17262

* working version with vscode debugger

* adding objects and shares controller

* adding contact controller

* remove item controller, new tables

* working objects FE and BE

* adding generic crud historical, missing generic service layer

* adding release notes and breaking changes

* merge conflict

* rework classes

* reverting items to normal crud

* put back on track shares controller

* adding contributor

* all working endpoints without dto for now

* working version of generic components

* working with sub component

* historical crud component ready, missing dynamic form

* dynamic listing and form

* adding showHistory

* little cleanup

* adding the other entities

* before cleanup in crud components

* refactoring in components

* adding blog posts

* move files

* adding sample database project

* adding contributor about page

* almost done for the v1 of the UI

* change naming of services in dto lib

* putting in place de dto layers

* Adding dependencies

* converting to json

* users with dto

* blog post with DTO

* update to existing tables

* hooks online

* Change log level

* adding production setup for SQL

* docker build image

* remove trigger

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>
@cvele89
Copy link

cvele89 commented Apr 23, 2020

got this error while running ng build.
Solution

1. add "@babel/compat-data": "~7.8.0" to devDependencies.

2. npm install

Helped me as well.

lonesomegeek added a commit to lonesomegeek/LSG.GenericCrud that referenced this issue Apr 26, 2020
* first draft, remove all <>

* rework unit tests to work with new structure

* Work/22 (#104)

* remove sync methods from service layer

* remove useless tests

* cleanup in sonar cube things (#105)

* Work/duge/85 (#106)

* massive cleanup of previous samples

* adding new samples structure

* Work/duge/86 (#115)

* massive cleanup of previous samples

* adding new samples structure

* remove extension project

* Work/duge/85 (#116)

* massive cleanup of previous samples

* adding new samples structure

* remove extension project

* cleanup in sonar cube things (#117)

* clean up nonasync things (#118)

* Work/duge/88 (#119)

* adding new build file

* default netcore

* ignore unsupported projects

* Update azure-pipelines.yml for Azure Pipelines

* adding pack and publish

* adding pack and publish

* adding pack and publish

* adding pack and publish

* adding pack and publish

* adding pack and publish

* adding pack and publish

* adding pack and publish

* Update azure-pipelines.yml for Azure Pipelines

* adding pack and publish

* adding pack and publish

* inject nuget api key from variable group

* inject nuget api key from variable group

* inject nuget api key from variable group

* inject nuget api key from variable group

* inject nuget api key from variable group

* add environment

* adding environment deployment

* adding environment deployment

* adding environment deployment

* adding environment deployment

* adding environment deployment

* adding build directory

* adding build directory

* adding build directory

* adding build directory

* adding build directory

* adding build directory

* adding build directory

* adding build directory

* adding build directory

* Update azure-pipelines.yml

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* Update build.yml

* Update build.yml

* Update build.yml

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* refactor release and build

* interface cleanup begun (#120)

* interface cleanup begun

* cleanup done

* create an injectable option object for service layer (#121)

* create an injectable option object for service layer

* extra line cleanup

* Work/duge/99 (#122)

* create an injectable option object for service layer

* extra line cleanup

* adding files ready for netcore 3.1 (#123)

* rework base classes and cleanup (#132)

* Work/duge/97 (#133)

* bug in master branch

* adding benchmark files

* Work/duge/95 (#134)

* adding material to test IEntity vs BaseEntity

* cleanup in samples

* putting in on track

* whant ignoring fields from changeset, ICreated and IModified is working

* working version with context and ignoreinchangeset attribute@

* Work/duge/94 (#137)

* adding files before waiting for the samples

* 2 different service layers

* ability to inject by model

* adding more documentation on custom layers

* adding more documentation

* adding initial sequence diagrams

* adding more doc on custom layers

* adding new version of sequence diagram

* Update sequence.drawio

* Update sequence.drawio

* Update sequence.drawio

* test before odata:

* updated sequence diagram

* adding PNG printouts of the schemas

* more sequence diagrams and docs

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* Work/duge/94 (#138)

* adding files before waiting for the samples

* 2 different service layers

* ability to inject by model

* adding more documentation on custom layers

* adding more documentation

* adding initial sequence diagrams

* adding more doc on custom layers

* adding new version of sequence diagram

* Update sequence.drawio

* Update sequence.drawio

* Update sequence.drawio

* test before odata:

* updated sequence diagram

* adding PNG printouts of the schemas

* more sequence diagrams and docs

* adding some docs in the main readme file@

* before merging with yden063 commit

* adding last doc for now

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* changing the commit mode of crud dto service layer (without historical crud)

* 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 aggrid

* tests with wsl2

* adding new docker commands for wsl

* adding babel to let ng build complete, bug documented here: angular/angular-cli#17262

* working version with vscode debugger

* adding objects and shares controller

* adding contact controller

* remove item controller, new tables

* working objects FE and BE

* adding generic crud historical, missing generic service layer

* adding release notes and breaking changes

* merge conflict

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* adjusting unit tests to new v5 structure (#141)

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* Work/duge/102 (#142)

* rework tutorials

* change samples

* move files to a more structure folder structure

* more doc

* more doc

* move files to new folders

* enough doc for samples

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* Work/duge/102 (#143)

* rework tutorials

* change samples

* move files to a more structure folder structure

* more doc

* more doc

* move files to new folders

* enough doc for samples

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* 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 aggrid

* tests with wsl2

* adding new docker commands for wsl

* adding babel to let ng build complete, bug documented here: angular/angular-cli#17262

* working version with vscode debugger

* adding objects and shares controller

* adding contact controller

* remove item controller, new tables

* working objects FE and BE

* adding generic crud historical, missing generic service layer

* adding release notes and breaking changes

* merge conflict

* rework classes

* reverting items to normal crud

* put back on track shares controller

* adding contributor

* all working endpoints without dto for now

* working version of generic components

* working with sub component

* historical crud component ready, missing dynamic form

* dynamic listing and form

* adding showHistory

* little cleanup

* adding the other entities

* before cleanup in crud components

* refactoring in components

* adding blog posts

* move files

* adding sample database project

* adding contributor about page

* almost done for the v1 of the UI

* change naming of services in dto lib

* putting in place de dto layers

* Adding dependencies

* converting to json

* users with dto

* blog post with DTO

* update to existing tables

* hooks online

* Change log level

* adding production setup for SQL

* docker build image

* remove trigger

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* Work/duge/93 (#145)

* cleanup + doc

* cleanup

* adding doc

* working links

* good dockerfile

* minor corrections

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>

* ready for beta1

* adjust project definitions

* adding old sample links

* adding release notes

* minor modifications

* minor modifications

* adding benchmark project launcher

* cleanup

* cleanup in docs

* minor modifications

* minor modifications

* prepare for v5

Co-authored-by: lonesomegeek <lonesomegeek@outlook.com>
johnpankowicz added a commit to govmeeting/govmeeting that referenced this issue May 5, 2020
Ran: npm i @babel/compat-data@7.8.0
See: angular/angular-cli#17262 (comment)

Note that 2 commits ago, I tried to fix 2 critical npm audit vulnerbilities'
The fix involved upgrading to @angular-devkit/build-angular@0.901.1/
But then caused a compile error which was fixed by doing this:
npm install --save-dev  @angular-devkit/build-angular@0.803.24
@dominic-ks
Copy link

dominic-ks commented May 23, 2020

got this error while running ng build.
Solution

1. add "@babel/compat-data": "~7.8.0" to devDependencies.

2. npm install

Helped me as well.

Same for me, started experiencing this error after updating an Ionic 4 app to Ionic 5 and building with Ionic Pro. All fine after adding this.

@ZakoMthiya
Copy link

Can confirm that manually adding "@babel/compat-data": "~7.8.0" to the devDependencies works.

You need to explicitly tell it to use version 7.8.0 (using ~ rather than ^) since any newer versions will not work.

Thank you. This worked for me as well

@harshkr101
Copy link

npm i @babel/compat-data@7.8.0
worked for me

mpanik pushed a commit to DNAstack/ddap-explore that referenced this issue Jun 19, 2020
…p), 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)
@bullwrinkle
Copy link

bullwrinkle commented Jun 22, 2020

I've tried all the various suggestions listed above and none of them are working for me.

  "devDependencies": {
    "@babel/compat-data": "^7.8.0",
    "@babel/core": "^7.10.3",
    "@babel/runtime": "^7.10.3",
     ..
}
$ rm -rf node_modules
$ yarn cache clean
$ yarn

Contents of package.json

  "name": "hmiclient",
  "version": "0.9.56",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "android.clean": "cd android && rm -rf build && ./gradlew clean && cd app && rm -rf build && cd .. && cd ..",
    "android.buildrelease.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && sh ./envconfig/upload-android-sourcemap.sh && cd android && ./gradlew bundleRelease",
    "android.buildrelease.stage": "export ENVFILE=.env.stage && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && ./gradlew android/assembleRelease",
    "android.buildrelease.prod.windows": "set ENVFILE=.env.prod && ./envconfig/setupenv.sh && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && cd android && ./gradlew bundleRelease",
    "android.debugrelease.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res  && cd android && ./gradlew assembleDebug",
    "android.run.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-android",
    "android.run.stage": "export ENVFILE=.env.stage && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-android",
    "android.run.local": "export ENVFILE=.env.local && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-android --appIdSuffix 'debug'",
    "android.run.local.windows": "set ENVFILE=.env.local && ./envconfig/setupenv.sh && react-native run-android --appIdSuffix 'debug'",
    "ios.buildrelease.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh",
    "ios.buildrelease.archive": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && xcodebuild archive -workspace ios/client.xcworkspace -scheme clientPROD -configuration Release -archivePath ios/build/clientPROD.xcarchive && xcodebuild -exportArchive -archivePath ios/build/clientPROD.xcarchive -exportOptionsPlist ios/exportOptions.plist -exportPath ~/Library⁩/Developer⁩/Xcode⁩/Archives⁩ && fastlane deploy XXX",
    "ios.run.prod": "export ENVFILE=.env.prod && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios",
    "ios.run.stage": "export ENVFILE=.env.stage && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios",
    "ios.run.local": "export ENVFILE=.env.local && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios --simulator='iPhone 8 Plus'",
    "ios.run.local_device": "export ENVFILE=.env.local_device && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios --device",
    "ios.run.local_other": "export ENVFILE=.env.local && chmod 755 ./envconfig/setupenv.sh && ./envconfig/setupenv.sh && react-native run-ios --simulator='iPhone X'",
    "test": "node node_modules/jest/bin/jest.js",
    "lint": "standard src/**/*.js src/**/*.jsx",
    "postinstall": "jetifier",
    "remotedev": "remotedev --hostname=192.168.1.66 --port=8000",
    "e2e": "wdio wdio.conf.js"
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.6.2",
    "@react-native-community/google-signin": "^4.0.0",
    "@react-native-community/react-native-cookies": "^1.1.0",
    "@react-navigation/native": "^5.1.1",
    "accordion-collapse-react-native": "^0.2.8",
    "base-64": "^0.1.0",
    "bugsnag-react-native": "^2.23.2",
    "crypto-js": "^3.1.9-1",
    "dotenv": "^8.2.0",
    "es6-promisify": "^6.0.2",
    "fast-deep-equal": "^2.0.1",
    "jetifier": "^1.6.4",
    "libphonenumber-js": "^1.7.26",
    "merge-anything": "^3.0.3",
    "mustache": "^3.1.0",
    "parse": "https://github.com/parse-community/Parse-SDK-JS#27a5ca00f41160791f80b8ed70bf3ce5afad5c0b",
    "patch-package": "^6.2.0",
    "postinstall-postinstall": "^2.0.0",
    "qs": "^6.9.1",
    "react": "16.12.0",
    "react-native": "0.61.4",
    "react-native-app-intro-slider": "^3.0.0",
    "react-native-appearance": "^0.3.3",
    "react-native-background-timer": "^2.1.1",
    "react-native-camera": "^3.9.0",
    "react-native-carrier-info": "^1.1.2",
    "react-native-config": "0.12.0",
    "react-native-contacts": "^5.0.6",
    "react-native-datepicker": "1.7.2",
    "react-native-device-info": "^5.2.1",
    "react-native-elements": "0.19.0",
    "react-native-fbsdk": "^1.1.1",
    "react-native-firebase": "~5.6.0",
    "react-native-fs": "^2.16.2",
    "react-native-gesture-handler": "1.5.0",
    "react-native-hyperlink": "^0.0.19",
    "react-native-image-picker": "1.1.0",
    "react-native-linear-gradient": "^2.4.4",
    "react-native-modal": "^11.5.3",
    "react-native-phone-input": "0.2.2",
    "react-native-picker-select": "6.3.3",
    "react-native-qrcode-svg": "^5.3.2",
    "react-native-reanimated": "1.4.0",
    "react-native-restart": "^0.0.13",
    "react-native-safe-area-context": "^0.6.1",
    "react-native-screens": "^2.8.0",
    "react-native-shapes": "^0.1.0",
    "react-native-svg": "^9.13.3",
    "react-native-swiper": "^1.6.0-rc.3",
    "react-native-swiper-flatlist": "2.0.3",
    "react-native-vcards": "^2.5.0",
    "react-native-vector-icons": "^6.1.0",
    "react-native-webview": "^7.4.3",
    "react-navigation": "^4.0.10",
    "react-navigation-stack": "^1.10.3",
    "react-navigation-tabs": "^2.5.6",
    "react-redux": "7.1.3",
    "redux": "4.0.4",
    "redux-persist": "^6.0.0",
    "redux-persist-filesystem-storage": "2.1.0",
    "redux-persist-transform-filter": "0.0.20",
    "redux-thunk": "^2.3.0",
    "remote-redux-devtools": "^0.5.16",
    "reselect": "^4.0.0",
    "rn-fetch-blob": "^0.12"
  },
  "devDependencies": {
    "@babel/compat-data": "^7.8.0",
    "@babel/core": "^7.10.3",
    "@babel/runtime": "^7.10.3",
    "@types/jest": "^24.0.22",
    "@wdio/allure-reporter": "^5.16.0",
    "@wdio/appium-service": "^5.16.5",
    "@wdio/cli": "^5.16.4",
    "@wdio/jasmine-framework": "^5.16.5",
    "@wdio/local-runner": "^5.16.4",
    "@wdio/mocha-framework": "^5.16.0",
    "@wdio/spec-reporter": "^5.15.2",
    "@wdio/sync": "^5.16.0",
    "appium": "^1.15.1",
    "babel-jest": "^24.9.0",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "chromedriver": "^78.0.1",
    "detox": "^14.7.0",
    "gradle-to-js": "^2.0.0",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.57.0",
    "react-test-renderer": "^16.11.0",
    "remotedev-server": "^0.3.1",
    "standard": "^14.3.1",
    "wdio-chromedriver-service": "^5.0.2",
    "wdio-video-reporter": "^1.4.4"
  },
  "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/client.app",
        "build": "xcodebuild -workspace ios/client.xcworkspace -scheme client -configuration Debug -UseNewBuildSystem=YES -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 8"
      },
      "ios.sim.release": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/client.app",
        "build": "set -o pipefail && export CODE_SIGNING_REQUIRED=NO && export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project ios/example.xcodeproj  -UseNewBuildSystem=YES -scheme example_ci -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 8"
      },
      "android.emu.debug": {
        "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
        "build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..",
        "type": "android.emulator",
        "name": "Pixel_2_API_29"
      },
      "android.emu.release": {
        "binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
        "build": "cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ..",
        "type": "android.emulator",
        "name": "Pixel_2_API_29"
      }
    },
    "test-runner": "jest",
    "specs": "e2e"
  },
  "resolutions": {
    "@babel/preset-env": "^7.8.7"
  },
  "standard": {
    "globals": [
      "__DEV__",
      "detox",
      "describe",
      "it",
      "beforeEach",
      "afterEach",
      "element",
      "expect",
      "by",
      "device",
      "waitFor",
      "fetch"
    ]
  }
}

And I still end up with the same error

[19:17:49] Error in plugin "gulp-babel"
Message:
    [BABEL] /Users/normanklein/Library/Caches/Yarn/v6/.tmp/dab8deaa179dd66562dd889ce1b3b406.27a5ca00f41160791f80b8ed70bf3ce5afad5c0b.prepare/src/Analytics.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/Users/normanklein/Library/Caches/Yarn/v6/.tmp/dab8deaa179dd66562dd889ce1b3b406.27a5ca00f41160791f80b8ed70bf3ce5afad5c0b.prepare/node_modules/@babel/preset-env/lib/index.js")
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! parse@2.11.0 gulp: `gulp "compile"`
npm ERR! Exit status 1

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

1 similar comment
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests