[vue3.x] TypeError: Object(...) is not a function
anfluff opened this issue · 11 comments
Hello.
I'm migrating my project from vue2 to vue3. On vue2 I used this slider alot and everithing works just fine.
On vue3 i've intalled 4.0.0-beta.5
version, but it throws me wierd error just from the beggining.
Have no idea what could be the reason - it works fine on clean new vue3 project, but does not even start on mine.
Probably there are some conflicts with other libraries or my config. Have you seen errors like this?
Environment
- OS & Version: Windows
- Vue version: 3.2.4
- Component Version: 4.0.0-beta.5
- Webpack: 5.53
Same Problem in version 3.2.14 but in version 4.0.0-beta4 it works
but cant use the beta version in productive systems
Same problem with 4.0.0-beta.1 - 4.0.0-beta.5 versions
Vue 3.2.24
Node 16.13.1
Vite 2.7.1
Anyone found a solution for this? I have the same issue on a Vite project with 4.0.0-beta.1 - 4.0.0-beta.5 versions too
I faced the same problem. And I had no problem when using @vue/compat
.
Same problem here !
Hello together,
I would like to use this library and also face this issue.
Did everyone find a solution to this?
Typescript InertiaJS / Vue Application
- Vite 2.7.13
- Vue 3.2.29
- Vue Slider Component 4.0.0-beta.4
Uncaught (in promise) TypeError: Object(...) is not a function at vue-class-component.esm-bundler.js:387:28 at Array.forEach (<anonymous>) at r2.setup (vue-class-component.esm-bundler.js:380:18) at callWithErrorHandling (runtime-core.esm-bundler.js:155:22) at setupStatefulComponent (runtime-core.esm-bundler.js:7045:29) at setupComponent (runtime-core.esm-bundler.js:7001:11) at mountComponent (runtime-core.esm-bundler.js:4922:13) at processComponent (runtime-core.esm-bundler.js:4897:17) at patch (runtime-core.esm-bundler.js:4489:21) at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5037:21)
Thank you and best regards!
Matthias
I am having the same problem. Running with vite.
yes up
Same problem here, any updates on this one?
I was able to fix this issue (using vue3 + typescript) with the following configurations:
to package.json:
"dependencies": {
"vue-property-decorator": "^9.0.2",
"vue-slider-component": "^4.0.0-beta.4"
},
"devDependencies": {
"vue-class-component": "^8.0.0-0",
}
to tsconfig.json:
"compilerOptions": {
"experimentalDecorators": true
}
If not using typescript, babel options could help for vue-class-component
fixed in 4.0.0-beta.8
.