hilongjw / vue-progressbar

A lightweight progress bar for vue
http://hilongjw.github.io/vue-progressbar
MIT License
1.46k stars 162 forks source link

Install fail on vue 3 #101

Open fxcjahid opened 2 years ago

fxcjahid commented 2 years ago

Hello, I have uses vue 3 app. But, after configuration VueProgressBar it couldn't install. Show the following issues on the console log. vue-progressbar.js:1 Uncaught TypeError: o is not a constructor at Object.install (vue-progressbar.js:1:5953) at Object.use (runtime-core.esm-bundler.js:4327:28) at main.js?t=1663055188118:69:5 https://prnt.sc/v-7XWAJuwgYS

My code is :

import { createApp } from "vue";
import App from "./App.vue";
import VueProgressBar from 'vue-progressbar';

const app = createApp(App);
app.use(VueProgressBar, {
    color: 'rgb(143, 255, 199)',
    failedColor: 'red',
    height: '2px'
});

app.mount("#app");

Please, Help me to solve this

joseprest commented 2 years ago

Uncaught TypeError: o is not a constructor at Object.install (vue-progressbar.js:1:5953) at Object.use (runtime-core.esm-bundler.js:4327:28) at main.ts:49:5

I have same problem in Vue 3 project ( use VITE )

FotieMConstant commented 1 year ago

Hey, just had the same issue and noticed someone has refined the component to have a vue3 compatibility.

here: https://github.com/aacassandra/vue3-progressbar

Hope that helps anyone who comes across this as well in the future!