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 降级 

先删除pinia

npm uni pinia

再重新安装

npm i pinia@2.0.36 --save -D

posted @ 2023-06-01 11:41  秃头的铲屎官  Views(2703)  Comments(0Edit  收藏  举报