Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

VueDraggable in nuxt error: Object(...) is not a function

Open ClaudiaGiv opened this issue 5 years ago • 9 comments

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: image Can you help me with this problem?

Thanks

ClaudiaGiv avatar Jan 14 '21 16:01 ClaudiaGiv

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?

versedpro avatar Jan 17 '21 20:01 versedpro

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.

versedpro avatar Jan 17 '21 23:01 versedpro

I also meet the same error at the current version:4.0.1, Does anyone have a suggestion to fix this issue? Thanks

besley avatar Apr 19 '21 12:04 besley

image Getting the same error. And didnt work even after downgrading to 2.24.3 and help is very much appreciated.

sunrayravi avatar May 24 '21 05:05 sunrayravi

Same here... Any update on this?

mirikerstein avatar Jul 04 '21 12:07 mirikerstein

Same issue here. image

brice-klein avatar Aug 25 '21 14:08 brice-klein

same here

WalterBrake avatar Feb 21 '22 17:02 WalterBrake

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.

airone01 avatar Jun 19 '22 10:06 airone01