vueuse / vue-demi

🎩 Creates Universal Library for Vue 2 & 3
MIT License
3.01k stars 158 forks source link

vue-demi 0.12.0 breaks @vueuse-core #113

Closed fk1blow closed 3 years ago

fk1blow commented 3 years ago

Uncaught Error: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function

using: "@vueuse/core": "^5.1.3" "@vue/composition-api": "1.0.5" "typescript": "4.2.4"

As a workaround, forcing a resolution to vue-demi@0.11.4 will do the trick, tho it will work only with yarn.

Maybe vueuse/core could change its dep declaration to a fixed version of vue-demi (instead of "@vueuse/core": " * ") ?

saranchonkau commented 3 years ago

@fk1blow Try to use webpack alias for @vue/composition-api image

It will work, because vue-demi uses the same file internally https://github.com/vueuse/vue-demi/commit/063dc2c0a093d9637517a848f207da21e64a36f5#diff-781086cee8b60b6a53af64f9aca30f211ea0f81ba82b2e31cc62d400e1a28e6aR2

fk1blow commented 3 years ago

Thanks @saranchonkau!

for the time being, we fixed it using yarn resolutions, but i still consider this to be a workaround that needs to be fixed.

antfu commented 3 years ago

106