Closed pishguy closed 3 years ago
After installing package when i try to use the package i get this error:
Reason: TypeError: vue__WEBPACK_IMPORTED_MODULE_3__.createApp is not a function
vue version:
vue
root@1a5a9f0c8af3:/var/www# vue --version @vue/cli 4.5.12
login.js file:
login.js
import {createApp} from 'vue'; import VueCountdown from '@chenfengyuan/vue-countdown'; const app = createApp({}); app.component(VueCountdown.name, VueCountdown); export default { data() { return { /// } }, }
app.js file content:
app.js
import Vue from 'vue' import {store} from '@Store/store.js' const {default: Vuelidate} = require('vuelidate'); Vue.use(Vuelidate) window.Vue = require('vue').default new Vue({ store, components:{ login:()=>import('@Auth/login.js'), /// },computed:{ /// },mount:{ /// } }).$mount('#app')
Use v1 for Vue 2, and v2 for Vue 3.
After installing package when i try to use the package i get this error:
vue
version:login.js
file:app.js
file content: