DanSnow / vue-recaptcha

Google ReCAPTCHA component for Vue.js
http://dansnow.github.io/vue-recaptcha/
MIT License
860 stars 133 forks source link

"export 'defineComponent' was not found in 'vue-demi' #933

Open mrc-bsllt opened 1 year ago

mrc-bsllt commented 1 year ago

Hello everyone, this error comes up when I import the component. I am using Vue version 2.6.11, and I also tried installing @vue/composition-api, but it does not work. I also tried to downgrade to version 1.3.0 of vue-recaptcha, and it does not work. Does anyone know how to fix it?

package.json

{ "dependencies": { "@rails/webpacker": "4.2.2", "autonumeric": "^4.6.0", "axios": "^0.19.2", "bootstrap": "^4.5.0", "mapbox-gl": "^2.7.0", "pug": "^2.0.4", "pug-loader": "^2.4.0", "pug-plain-loader": "^1.0.0", "swiper": "^5.4.5", "v-tooltip": "^2.0.3", "vue": "^2.6.11", "vue-awesome-swiper": "^4.1.1", "vue-carousel": "^0.18.0", "vue-google-autocomplete": "^1.1.3", "vue-loader": "^15.9.2", "vue-loading-spinner": "^1.0.11", "vue-mapbox": "^0.4.1", "vue-multiselect": "^2.1.6", "vue-recaptcha": "1.3.0", "vue-router": "3", "vue-template-compiler": "^2.6.11", "vue2-datepicker": "^3.10.4", "vueperslides": "^2.8.6", "vuex": "^3.4.0" }, "devDependencies": { "node-sass": "^4.14.1", "sass-loader": "^8.0.2", "webpack-dev-server": "^3.11.0" }, "browserslist": ">0.2%, not dead, not ie 11, not chrome < 51, not safari < 10" }

mrc-bsllt commented 1 year ago

In case anyone runs into the same problem as me, the procedures are:

This way it works for me. https://www.npmjs.com/package/vue-recaptcha/v/1.3.0