Vue 2.7: Error "VueCompositionAPI is not defined" in hasInjectionContext()
tkallage opened this issue · 3 comments
I am using Vue 2.7.14
Since upgrading pinia from 2.0.36 to 2.1.0, I get the following error, originating from vue-demi:
Pinia 2.0 does not produce this issue, as it used hasInjectionContext
from the vue package instead of vue-demi (see vuejs/pinia@915e754)
JSFiddle with Pinia 2.0 (working):
https://jsfiddle.net/mk56hoqe/2/
JSFiddle with Pinia 2.1 (broken):
https://jsfiddle.net/egay83mp/4/
@antfu :(
well.. my jsfiddle minimal repro works now - but in my project the errors is still there.
In my project the .cjs is used in my jest tests and .mjs is used by vue-cli. In both cases the error "VueCompositionAPI is not defined" still exists.
I actually dont know how to provide a minimal example with jsfiddle in this case...