Open liushuai05 opened 1 year ago
In my case (vite + vue3), I resolved the error by directly importing the CommonJS dist module.
Change your import from
import draggable from "vuedraggable"
to
import draggable from "vuedraggable/dist/vuedraggable.common";
I also encountered this problem, but none of the solutions said on the Internet have been solved, I don't know if it is a VUE version compatibility problem (^3.4.27)
doesn't work for me
Of course, I saw that this problem had been solved in https://github.com/SortableJS/Vue.Draggable/issues/881, but it didn't seem to work in my environment and still reported this error.
I downloaded the files in the src directory directly and put them in my project, and it seems to have worked. I wonder if the pacage on npmjs is not updated to the latest, but the version number I pulled by yarn is 4.0.2, which is higher than the tag version in the current project. I don't know why.