pinia-class-component
pinia-class-component copied to clipboard
Cannot read properties of undefined (reading '_s')
https://github.com/Maakdev/nuxt-pinia-class
The problem is after build of project
500 Cannot read properties of undefined (reading '_s')
[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"
return function () {
// return useStore();
const nuxtApp = (0, unctx_1.getContext)('nuxt-app').tryUse();
console.log('nuxtApp', nuxtApp)
if (nuxtApp) {
return nuxtApp.runWithContext(() => useStore(nuxtApp.$pinia));
}
};