Closed ncnt257 closed 1 year ago
pinia same error,need fix as soon as possible
caught SyntaxError: The requested module '/@fs/E:/xxx/node_modules/.pnpm/vue-demi@0.14.5_vue@3.3.4/node_modules/vue-demi/lib/index.mjs?v=5975676c' does not provide an export named 'hasInjectionContext' (at pinia.mjs:6:10)
import { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope , ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance , reactive, toRef, del, nextTick, computed, toRefs } from "/@fs/E:/xxx/node_modules/.pnpm/vue-demi@0.14.5_vue@3.3.4/node_modules/vue-demi/lib/index.mjs?v=5975676c";
捕获语法错误:请求的模块'/@fs/E:/xxx/node_modules/.pnpm/vue-demi@0.14.5_vue@3.3.4/node_modules/vue-demi/lib/index.mjs?v=5975676c'确实不提供名为“hasInjectionContext”的导出(在 pinia.mjs:6:10)
import { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope , ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, del, nextTick, computed, toRefs } from "/@fs/ E:/xxx/node_modules/.pnpm/vue-demi@0.14.5_vue@3.3.4/node_modules/vue-demi/lib/index.mjs?v=5975676c";
In vue-demi, 'hasInjectionContext' is provided by Vue in version 3. Please check if your Vue version is up-to-date and provides this method. I'm using the latest version of Vue and Pinia, and I haven't encountered the issue you mentioned. You can try it out.
@esorribas After your comment I was able to get "NITRO_PRESET=firebase yarn build" up and running 👍
Any luck with this? I've tried all the things online and absolutely no luck.
I'm using Nuxt 3.1.1 with vueuse/nuxt 9.13.0 (NodeJS 16.3.0). I just reinstalled the packages yesterday and meet this error.
The requested module 'vue-demi' does not provide an export named 'hasInjectionContext'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:181:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:281:24)