pnpm install后弹错

Uncaught SyntaxError: The requested module '/node_modules/.pnpm/vue-demi@0.14.5_vue@3.3.4/node_modules/vue-demi/lib/index.mjs?v=b7df6023' does not provide an export named 'hasInjectionContext'
21:06:20.970 "hasInjectionContext" is not exported by "node_modules/.pnpm/pinia@2.1.3_typescript@5.0.4_vue@3.3.4/node_modules/vue-demi/lib/index.mjs", imported by "node_modules/.pnpm/pinia@2.1.3_typescript@5.0.4_vue@3.3.4/node_modules/pinia/dist/pinia.mjs".
21:06:20.970 at ../node_modules/.pnpm/pinia@2.1.3_typescript@5.0.4_vue@3.3.4/node_modules/pinia/dist/pinia.mjs:6:9
21:06:20.975   4:   * @license MIT
21:06:20.975   5:   */
21:06:20.978   6: import { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isVue2, isRef, isReactive, set,...
21:06:20.981               ^
21:06:20.984   7: import { setupDevtoolsPlugin } from '@vue/devtools-api';

版本太高了,回退版本
pnpm i pinia@2.0.35

posted @ 2023-05-24 21:11  寒冷的雨呢  阅读(2588)  评论(0编辑  收藏  举报