Reputation: 125
As I am migrating my Vue 2 project to Vue 3 and facing some chanllenges about using UI framework Burefy. There is no official support for Vue 3 from Burefy but trying to use buefy-next which extension of Buefy for Vue 3. But Having some problem to use the it at application startup.
As mentioned on docs: https://github.com/ntohq/buefy-next?tab=readme-ov-file#2-import-and-use-buefy, installed buefy-next
"buefy": "npm:@ntohq/buefy-next@^0.1.2",
But when I try to use it in main.ts, it is not working
import Buefy from 'buefy'
import 'buefy/dist/buefy.css';
import {BuefyConfig} from "buefy/types/components";
const config: BuefyConfig = {
defaultLocale: 'en',
};
const app = createApp(App);
app.use(Buefy, config);
The following error is appearing after this
Overload 1 of 2, '(plugin: Plugin<[BuefyConfig]>, options_0: BuefyConfig): App<Element>', gave the following error.
Argument of type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to parameter of type 'Plugin<[BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type 'FunctionPlugin<[BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type '(app: App<any>, options_0: BuefyConfig) => any'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' provides no match for the signature '(app: App<any>, options_0: BuefyConfig): any'.
Overload 2 of 2, '(plugin: Plugin<[config: BuefyConfig]>, options: [config: BuefyConfig]): App<Element>', gave the following error.
Argument of type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to parameter of type 'Plugin<[config: BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type 'FunctionPlugin<[config: BuefyConfig]>'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' is not assignable to type '(app: App<any>, config: BuefyConfig) => any'.
Type '{ install(Vue: typeof import("./vue3-demo2/node_modules/vue/dist/vue"), config: BuefyConfig): void; }' provides no match for the signature '(app: App<any>, config: BuefyConfig): any'.
34 | defaultLocale: 'en',
35 | };
> 36 | app.use(Buefy, config);
|
^^^^^
Please guide me, what am I doing wrong.
Thanks in advance.
Upvotes: 2
Views: 316