piecioshka
piecioshka

Reputation: 5121

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

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?

Upvotes: 4

Views: 2513

Answers (1)

piecioshka
piecioshka

Reputation: 5121

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.

Upvotes: 4

Related Questions