Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queryContent doesn't resolving on SSR #1510

Closed
cawa-93 opened this issue Sep 8, 2022 · 2 comments
Closed

queryContent doesn't resolving on SSR #1510

cawa-93 opened this issue Sep 8, 2022 · 2 comments

Comments

@cawa-93
Copy link
Contributor

cawa-93 commented Sep 8, 2022

Environment

  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.9
  • Nitro Version: 0.5.1
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: modules
  • Runtime Modules: @nuxt/content@2.1.0
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-6ahpka-6fyebp?file=components%2FFeed.vue%3AL21

Describe the bug

In demo queryContent doesn't return posts on SSR, but work on client rendering.

Open demo. Home page rendered correct on server and client. From there go to /tags/sirovovk (nuxt-link) to trigger client rendering. You should see JSON with 4 posts. Now click /tags/sirovovk (a) to trigger SSR for same page. Expected: same JSON with 4 posts, but actual: nothing.

Additional context

May be related to #1471 but I'm not shure

Logs

No response

@farnabaz
Copy link
Member

It is related to nuxt/nuxt#12793.
You can use callWithNuxt to execute the second query fetch, see: nuxt/nuxt#14269

Updated demo: https://stackblitz.com/edit/github-6ahpka-qvdwk7?file=components%2FFeed.vue

@farnabaz
Copy link
Member

close in favor of nuxt/nuxt#12793

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants