vue-recaptcha
vue-recaptcha copied to clipboard
Cannot read properties of undefined (reading 'defineComponent')
Hello,
I'm trying to run the example in the repo and there are a few console messages. The first is:
Uncaught TypeError: Cannot read properties of undefined (reading 'defineComponent') at vue-recaptcha.js:116
Then there are some Vue warnings for:
Component is missing template or render function.
Is there anything else needed to run the example? Thanks!
first part of the issue needs some RTFM:
like documented, you need to import @vue/composition-api
and vue-demi
the missing templates remain a problem.
it's also a duplicate: https://github.com/DanSnow/vue-recaptcha/issues/766
There's a whole stream of related errors such as
[Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().
:(
@vue/composition-api is not needed for Vue 2.7, but vue-recaptcha still won't run w/o it
See https://github.com/vuejs/composition-api