Open popnoodles opened 1 year ago
Following...
Hi, it seems there is something incompatible with new vue 3.
I created a new vue-app "vue": "^3.3.4"
after installing "vue-qrcode-component": "^2.1.1"
with yarn add
the following error rise:
Cannot find module 'vue-qrcode-component' or its corresponding type declarations.ts(2307)
js console:
Uncaught SyntaxError: The requested module '/node_modules/qrcode-js-package/qrcode.js?v=6f1bdf41' does not provide an export named 'default' (at QRCode.vue:7:12)
main.ts
import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import VueQRCodeComponent from 'vue-qrcode-component' // error here
import App from './App.vue'
import router from './router'
const app = createApp(App)
app.component('qr-code', VueQRCodeComponent)
app.use(createPinia())
app.use(router)
app.mount('#app')
Hi,
This component was developed for the first version of Vue and it was still compatible with Vue2. I've recently started to get into Vue again and learning the changes in Vue3, so I will take a look into this as soon as possible.
@maguri Thank you for all that information, it will help troubleshooting 😃
npm install vue-qrcode-component import VueQRCodeComponent from 'vue-qrcode-component';
Produces:
Uncaught SyntaxError: The requested module '/node_modules/qrcode-js-package/qrcode.js?v=c0063e26' does not provide an export named 'default' (at QRCode.vue:7:12)