Closed qq958691165 closed 1 year ago
I had the same problem
pinia降版本至2.0.23,可以用
我有同样的问题
This is because your vite-plugin-uni plugin is based on vue@3.2.47. hasInjectionContext is a method added in version 3.3, which Pinia is currently using and requires the latest 3.3 version. If you are using Vue 3.2, you cannot use the latest version of Pinia.
I'm sure this happens to programmers all over the world
yes, thanks.I also encountered this problem.
pinia
the new version should be with Vue@3.3
+.
@posva should this indicate a warning in Pinia's docs?
This error means you dont have the necessary vue version installed. Pinia has the peer dependency set to ^3.3.0, it’s important to not ignore that warning when installing.
If a library like uview plus is adding vue as a dependency, it can also create this kind of errors, but that an issue to be reported there
You can use pnpm why vue to check the installed version and debug further and use pnpm update vue to update it but this goes beyond vue-demi’s responsibility
pinia.mjs:6 Uncaught SyntaxError: The requested module '/node_modules/vue-demi/lib/index.mjs?v=151548d1' does not provide an export named 'hasInjectionContext' (at pinia.mjs:6:10)