phphe / vue-draggable-nested-tree

Vue2 draggable tree component
https://hetree.phphe.com/
MIT License
344 stars 62 forks source link

Cannot find module 'core-js/library/fn/object/keys' #79

Closed ben-roth closed 5 years ago

ben-roth commented 5 years ago

After I run npm install vue-draggable-nested-tree I receive this error "Cannot find module 'core-js/library/fn/object/keys'",

It seems like core-js has changed a lot and now there are a bunch of broken dependencies.

phphe commented 5 years ago

I created a test at https://codesandbox.io/s/vue-template-ejc2h I can not get the error

vjee commented 5 years ago

@ben-roth Are you using core-js@3 in your project? The import path does not exists in core-js 3 but it does under version 2. I'm running into the same issues.

vjee commented 5 years ago

Try import ... from "vue-draggable-nested-tree/dist/vue-draggable-nested-tree.js" instead of import ... from "vue-draggable-nested-tree".

This file will have all the core-js requirements included so if you get these errors because of a version mismatch, it should work.

ben-roth commented 5 years ago

@vjee yes, that's my issue. Odd though that we have to specify like that?