I can't seem to get this to work as a component
dajeinc opened this issue · 7 comments
EDIT: YOU HAVE TO USE V4.0 WITH VUE 3
// Install 4.0.0
npm install --save-dev vue-cropperjs@4.0.0
Ive been trying for a couple of days. New to Vue so maybe I am missing something.
When I put your code in a clean Vue3 Cli project it works great.
When I put it into a component and then use that component in a view it breaks.
h is not a function
I try to import h inside your code and then exports.default breaks.
Any help?
Same issue.
VueCropper.js?95c3:21 Uncaught (in promise) TypeError: h is not a function
at Proxy.render (VueCropper.js?95c3:21)
at renderComponentRoot (runtime-core.esm-bundler.js?5c40:710)
at componentEffect (runtime-core.esm-bundler.js?5c40:4193)
at reactiveEffect (reactivity.esm-bundler.js?a1e9:42)
at effect (reactivity.esm-bundler.js?a1e9:17)
at setupRenderEffect (runtime-core.esm-bundler.js?5c40:4176)
at mountComponent (runtime-core.esm-bundler.js?5c40:4134)
at processComponent (runtime-core.esm-bundler.js?5c40:4094)
at patch (runtime-core.esm-bundler.js?5c40:3715)
at mountChildren (runtime-core.esm-bundler.js?5c40:3897)
Hi guys,
(@dajeinc, @tachang)
Seems that Vue 3 support hasn't been published to NPM yet. Latest release still 4.2.0 without Vue 3 support.
I fixed this problem by directly installing from GitHub instead of NPM library.
npm i git+https://github.com/Agontuk/vue-cropperjs.git
But hope this gets fixed by @Agontuk by publishing the latest release.
(#92)
Hope the above command can help someone till that happens.
v5.0.0 has been published
@Agontuk I'm having same issue with latest from npm
[Vue warn]: Error in render: "TypeError: (0 , _vue.h) is not a function"
still not fixed the issue yet.
// Uninstall the latest version of vue-croppperjs
npm uninstall --save-dev vue-cropperjs
// Install 4.0.0
npm install --save-dev vue-cropperjs@4.0.0
Guys, please check the compatibility section in the readme.