Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resolve 'core-js/client/shim — Upgrade Angular from v6 to v7

Tags:

angular

After upgrade new version of Angular that error occurs:

Can't resolve 'core-js/client/shim

In main.ts I have code:

// Shim the environment
import 'core-js/client/shim';

Any ideas on how to resolve?

like image 303
piecioshka Avatar asked Aug 31 '25 10:08

piecioshka


1 Answers

Try to replace:

// Shim the environment
import 'core-js/client/shim';

by:

// Shim the environment
import 'core-js/features/reflect';

Angular use Reflecting to make Dependency Injection works.

like image 84
piecioshka Avatar answered Sep 02 '25 23:09

piecioshka