Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating stackblitz Angular version to the latest

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?

like image 428
gfels Avatar asked Mar 21 '19 12:03

gfels


People also ask

How do I change the Angular version in StackBlitz?

You can update the version manually by installing [email protected] .

How do I upgrade to the latest version of Angular?

To update to the next beta or pre-release version, use the --next option. We recommend that you always update to the latest patch version, as it contains fixes we released since the initial major release. For example, use the following command to take the latest 10. x.x version and use that to update.

Can I use Angular CLI in StackBlitz?

StackBlitz supports Angular CLI commands in the user interface.

How do I upgrade Angular to 10?

Run ng update @angular/core @angular/cli which should bring you to version 10 of Angular. New projects use the filename . browserslistrc instead of browserslist . ng update will migrate you automatically.


1 Answers

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 [email protected].

Edit:

Tried installing [email protected] 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.

like image 181
Sachin Gupta Avatar answered Sep 18 '22 16:09

Sachin Gupta