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

Nuxt 3.15.1 breaks the module #83

Open
TheDutchCoder opened this issue Jan 7, 2025 · 2 comments
Open

Nuxt 3.15.1 breaks the module #83

TheDutchCoder opened this issue Jan 7, 2025 · 2 comments

Comments

@TheDutchCoder
Copy link

Environment


  • Operating System: Darwin
  • Node Version: v20.13.0
  • Nuxt Version: 3.15.1
  • CLI Version: 3.17.2
  • Nitro Version: 2.10.4
  • Package Manager: npm@10.5.2
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/eslint@0.7.4, nuxt-open-fetch@0.9.5, @nuxtjs/i18n@9.1.1, nuxt-jsonld@2.1.0, @nuxtjs/device@3.2.4, @nuxtjs/robots@5.1.0, @vueuse/nuxt@12.3.0, @sidebase/nuxt-auth@0.9.4, @vesp/nuxt-fontawesome@1.1.0
  • Build Modules: -

Reproduction

N/A

Describe the bug

We upgraded to Nuxt 3.15.1, and since then our useThing composable throw hydration errors when fetching data and we have to rely on a custom useAsyncData implementation, using $thing.

Under the hood, useThing should just be useAsyncData('key', $thing() => {}), correct?

So maybe something changed slightly in Nuxt that breaks this implementation?

We've debugged this a bit, and it turns out that the server-side fetch is correct, but initially the client-side one is null for an instant.
You can see this by using an immediate watcher on the data.

Additional context

No response

Logs

No response

@ReWWeR
Copy link

ReWWeR commented Jan 18, 2025

Got the same issue. Wrapping everything in custom useAsyncData helps, but I've got a lot of not wrapped API calls so it is not solution for me.

Noticed that problem can be somehow related to payload.data key generation, cause it API called twice (on SSR and on front-end) with different keys.

Image

@jonkri
Copy link

jonkri commented Jan 19, 2025

It may not be related but I did get a momentary null value here: #62.

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

3 participants