uniapp+vue3+ts 使用pinia報錯

秃头的铲屎官發表於2024-03-23

uniapp+vue3+ts 使用pinia報錯
"hasInjectionContext" is not exported by "node_modules/vue-demi/lib/index.mjs", imported by "node_modules/pinia/dist/pinia.mjs". 11:36:19.397 at ../node_modules/pinia/dist/pinia.mjs:6:9

解決方法:

先刪除pinia

npm uni pinia

再重新安裝

npm i pinia@2.0.36 -force

相關文章