DamianOsipiuk / vue-query

Hooks for fetching, caching and updating asynchronous data in Vue
https://vue-query.vercel.app/
MIT License
1.11k stars 48 forks source link

[BUG] in vue/vueQueryPlugin.d.ts type error in vuejs 2 #146

Closed joojaewoo closed 2 years ago

joojaewoo commented 2 years ago

I use vue-query in project

    // package.json
    "vue": "2.6.11",
    "vue-query": "^1.19.2",
    "@vue/composition-api": "1.4.9",

I want to build with vue-cli, but type error occurred.

my build command is vue-cli-service build

Type errors still occur in your example 2.x-basic. No error when using vite.

Do you check this issue? I'm attaching the picture below.

image

leedabin commented 2 years ago

I am having the same problem.

I wish it was modified to support both useQueryProvider and VueQueryPlugin.

joojaewoo commented 2 years ago

VueQueryDevTools have same problem.

ERROR in .../vue-query/lib/devtools/DevtoolsPanel.vue.d.ts(9,44): 'vue-demi/lib/index' has no exported member 'DefineComponent'

declare const _default: import("vue-demi").DefineComponent<{

Build cannot proceed because of an error. I wish check this problem.

wobsoriano commented 2 years ago

I have some libraries using vue-demi too, it’s the culprit

DamianOsipiuk commented 2 years ago

@joojaewoo Vue3-only type import from vueQueryPlugin will be removed in https://github.com/DamianOsipiuk/vue-query/pull/147

As for the DevTools, for now i do not have a fix for it. You might want to set skipLibCheck: true in your tsconfig for now.