[Vuejs]-Vue3 + typescript: TS2345: Argument of type 'Router' is not assignable to parameter of type 'Plugin_2'

2👍

We’ll it looks like an oddity of yarn…

We upgraded now all dependencies of vue to "vue": "^3.2.29" and the error is gone.

2👍

In my case, the error appeared when installing Element plus UI. And I decided to set the type "types": ["element-plus/global"] in tsconfig.json

Update:
It is just as easy to solve a problem of the specified type as any. I do not know how correct this is, but the typescript does not always show an error. For example:
createApp(App).use(i18n as any).use(ElementPlus).use(router as any).use(createPinia() as any).mount('#app')

Leave a comment