“hasInjectionContext“ is not exported by “node_modules/vue-demi/lib/index.mjs“, imported by “node_mo

使用uniapp开发的微信小程序,技术栈使用的vue3+ts+uview-plus+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的版本和vue3的版本,也解决不了

最后还是通过锁定yarn文件实现的,yarn.lock文件还是必须的,找到网上的一个yarn.lock文件,然后重新执行yarn 命令,安装依赖,然后就可以正常启动了:“hasInjectionContext“ is not exported by “node_modules/vue-demi/lib/index.mjs“, imported by “node_mo_第1张图片

我的yarn.lock文件可以分享给你们,你们看行不行:yarn.rar - 蓝奏云

你可能感兴趣的:(HTML前端,vue.js,前端,javascript)