bridge: useNuxtApp() and useRuntimeConfig not available in pinia store during SSR
Environment
- Operating System:
Darwin - Node Version:
v18.7.0 - Nuxt Version:
2.16.0-27616340.013f051b - Package Manager:
yarn@3.2.1 - Builder:
webpack - User Config:
buildDir,srcDir,bridge,components,ssr,dev,alias,image,generate,head,typescript,publicRuntimeConfig,privateRuntimeConfig,css,loading,loadingIndicator,plugins,buildModules,modules,proxy,axios,vuetify,build,serverHandlers,devServerHandlers - Runtime Modules:
@nuxtjs/vuetify@1.12.3,@nuxt/image@0.7.1,@nuxtjs/axios@5.13.6,@nuxtjs/proxy@2.1.0,nuxt-social-meta@1.0.0 - Build Modules:
(),nuxt-storm@1.1.3,nuxt-compress@5.0.0,@pinia/nuxt@0.3.1,~/modules/apolloSSR,@nuxt/bridge@3.0.0-27639120.e7a7f9b
Reproduction
https://github.com/vuejs/pinia/discussions/1526
Describe the bug
I am getting this error

When running this pinia actions during SSR

I rolled back to the old this.$nuxt for now to temporarily solve the issue
Additional context
The page being loaded uses the default.vue layout which has an apollo query “labels”
So that, together with this query causes the error.

No response
Logs
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 16 (2 by maintainers)
up please, is there any hope for this bug to be fixed ? (nuxt3 + pinia). This bug happen to me when I call async methods in pinia actions during SSR.
It’s available now but not have a type support.