版本兼容问题

Vue 3 开发中遇到的问题及解决方案(fix bug)-LMLPHP

vite v3.2.4 building for development...
'hasInjectionContext' is not exported by node_modules/pinia/node_modules/vue-demi/lib/index.mjs, imported by node_modules/pinia/dist/pinia.mjs
at ../node_modules/pinia/dist/pinia.mjs:6:9
  4:  * @license MIT
  5:  */
  6: import { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReactive, set, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, del, nextTick, computed, toRefs } from 'vue-demi';
              ^
  7: import { setupDevtoolsPlugin } from '@vue/devtools-api';

解决方案1

思路
解决过程

Vue 3 开发中遇到的问题及解决方案(fix bug)-LMLPHP

12-18 14:48