简体   繁体   中英

Angular 7: Cant' resolve core-js/features/object/keys

In my project, I am using the ngx-toaster for the alert/warning/error messages, but when I checked on IE9,10,11 the toaster is not displaying

As a workaround from this thread https://github.com/scttcper/ngx-toastr/issues/673

i've imported

import 'core-js/features/object/keys';

But this throws the following error

Cant' resolve core-js/features/object/keys

However this import 'core-js/es6/object' is actually a valid import

core-js version: 2.5.4

If you check the docs for core-js@2 , you'll see that core-js/features/object/keys is not present.

Version 2 docs: https://github.com/zloirock/core-js/tree/v2

I think the import you're looking for in version 2 is core-js(/library)/fn/object/keys

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM