VueDraggable in nuxt error: Object(...) is not a function
Hi,
I have a nuxt project with VueDraggable library integrated in following the steps from this issue: https://github.com/SortableJS/Vue.Draggable/issues/525
And it gives the error:
Can you help me with this problem?
Thanks
Hi there
same issue here! 😓 I used Vue v2.6.11 and followed npm guide. However, I've faced a weird issue and here is my error log:
vuedraggable.umd.js?b76a:4753 Uncaught TypeError: Object(...) is not a function
at Module.fb15 (vuedraggable.umd.js?b76a:4753)
at __webpack_require__ (vuedraggable.umd.js?b76a:30)
at eval (vuedraggable.umd.js?b76a:94)
at eval (vuedraggable.umd.js?b76a:97)
at webpackUniversalModuleDefinition (vuedraggable.umd.js?b76a:3)
at eval (vuedraggable.umd.js?b76a:10)
at Object../node_modules/vuedraggable/dist/vuedraggable.umd.js (chunk-vendors.js:8415)
at __webpack_require__ (app.js:854)
at fn (app.js:151)
at eval (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vuetify-loader/lib/loader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/Pages/Merchants/MerchantFiledMap.vue?vue&type=script&lang=js&:2)
I don't know why this happens.
I've tried to wrap with curly brackets like this:
import { draggable } from "vuedraggable"
but same error.
In my opinion, this issue is happening recently. Is this an issue due to deprecate of version?
Oh, latest version is not working for me! (2.24.3)
I've downgraded version and "vuedraggable": "^2.24.2" is fine eventually. 😅😅😅
@ClaudiaGiv I hope this is helpful in your particular case.
I also meet the same error at the current version:4.0.1, Does anyone have a suggestion to fix this issue? Thanks
Getting the same error.
And didnt work even after downgrading to 2.24.3
and help is very much appreciated.
Same here... Any update on this?
Same issue here.

same here
I figured it out. I was trying to run the @next version of vuedraggable, which is meant to work for vue v3+. However, Nuxt uses vue v2, hence the error.
yarn remove vuedraggable@next (or npm un vuedraggable@next)
and yarn add vuedraggable (or npm i vuedraggable)
You can close this issue I guess.