fengyuanchen / vue-countdown

Countdown component for Vue.js.
https://fengyuanchen.github.io/vue-countdown/
MIT License
690 stars 89 forks source link

createApp is not a function #66

Closed pishguy closed 3 years ago

pishguy commented 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:

root@1a5a9f0c8af3:/var/www# vue --version
@vue/cli 4.5.12

login.js file:

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:

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')
fengyuanchen commented 3 years ago

Use v1 for Vue 2, and v2 for Vue 3.