Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialization problem in 1.0.3 #769

Closed
GeekyMonkey opened this issue Jul 19, 2021 · 8 comments
Closed

Initialization problem in 1.0.3 #769

GeekyMonkey opened this issue Jul 19, 2021 · 8 comments
Labels
needs reproduction We need a runnable reproduction from the OP

Comments

@GeekyMonkey
Copy link

Version 1.0.2 works fine in my project, but when I tried to go to 1.0.3 I get this

"[vue-composition-api] must call Vue.use(VueCompositionAPI)"

I've tried adding this at the top of main.ts

Vue.use(VueCompositionApi);

But that didn't help. Rolling back to 1.0.2 for now.

@Ttou
Copy link

Ttou commented Jul 20, 2021

same issue

@ygj6
Copy link
Member

ygj6 commented Jul 20, 2021

Can you share a minimal reproduction? Thanks.

@antfu antfu added the needs reproduction We need a runnable reproduction from the OP label Jul 20, 2021
@GeekyMonkey
Copy link
Author

@ygj6 Sorry, I've a big hairy project and under time pressure at the moment so I can't make a minimal version. Hopefully someone else with the problem can share.

@schillerenrico
Copy link

same here

@tobiasdalhof
Copy link

vueuse/vueuse#640 related?

@lpj145
Copy link

lpj145 commented Jul 21, 2021

Same here, i simple install latest version of composition-api and vue-use, and when i call Vue.use(CompositionApi) i have unexpected error:
image

The steps is:
yarn add @vue/composition-api
yarn add @vueuse/core

and create component and try to use onClickOutside

@lpj145
Copy link

lpj145 commented Jul 21, 2021

@antfu something about vue-composition is installing when it's imported.

@ygj6
Copy link
Member

ygj6 commented Jul 22, 2021

This line :

export { ${exports.join(', ')} } from '@vue/composition-api/dist/vue-composition-api.esm.js'

in vue-demi caused both vue-composition-api.esm.js and vue-composition-api.mjs versions to be used at the same time.

And the install function:

export function install(Vue: VueConstructor)

of composition-api was not called in vue-composition-api.mjs.

So it caused the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction We need a runnable reproduction from the OP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants