8

I updated this stackblitz https://stackblitz.com/edit/template-driven-form-demo-bnezpz?file=app/user-form/user-form.component.ts

to the latest angular version by pressing the refresh button in the dependencies tab.

The result is that it keeps asking me to install core-js, but it doesn't matter how many times I press install, it just keeps popping up and asking me to install core-js. What's wrong here?

GeForce RTX 4090
  • 3,091
  • 11
  • 32
  • 58
  • 1
    Looks like 2.6.9 was the last of the core-js' 2.x versions. Today Angular 8.1.1 was released and still no update to core-js 3.x. Here is the issue: https://github.com/angular/angular-cli/issues/13954 – Ben Racicot Jul 10 '19 at 22:28

2 Answers2

9

There seems to be some incompatibility in package version. Uninstall the core-js:3.0.0. is not working. You can update the version manually by installing core-js@2.5.4.

Edit:

Tried installing core-js@3.0.0 in local, It seems like there are some breaking changes in the latest core-js package. Previously (version < 3.0.0), the javascript specific things were in sub-folders in core-js (like core-js/es6/symbol, core-js/es7/reflect).

From version 3.0.0, all these things have been moved to core-js/es/*. Various angular packages depend on the previous versions and are not able to find the directories at right place, thus you are getting the error.

Sachin Gupta
  • 4,981
  • 3
  • 16
  • 32
1

As of 2021-08-16, @3.x still ask you to Install even ng is upgraded to 12x. So, simply

  1. delete core-js from Dependency
  2. enter core-js@2.6.9, hit <enter>
Jeb50
  • 6,272
  • 6
  • 49
  • 87