You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to both Nuxt and Sanity so I'm unsure if this is a bug or I am doing something wrong as I cannot find any documentation as well as related reports for this issue.
Problem
I am facing a problem where component inside <ClientOnly> tag (or cmp.client.vue) is not rendered at all when using Sanity query.
The error message from the console is:
If I remove any of the Sanity composables (useSanityQuery or useLazySanityQuery), the client component will be rendered normally
Workaround
A workaround (or intended feature) I found is to enable minimal: true for Sanity inside nuxt.config.ts
Reproduction
You can clone these apps to test. But they are entirely fresh so any inited apps will do.
Note:
I tried to reproduce on StackBlitz here but the issue does not occur. The only difference is I'm using pnpm for local development whereas StackBlitz uses npm (and its other env)
System
OS: WSL 2 Ubuntu 20.04
Node: 18.20.0
pnpm: 8.15.5
Nuxt: 3.11.1
@nuxtjs/sanity: 1.10.1
The text was updated successfully, but these errors were encountered:
Hi, first of all, thank you for the great module.
I'm new to both Nuxt and Sanity so I'm unsure if this is a bug or I am doing something wrong as I cannot find any documentation as well as related reports for this issue.
Problem
I am facing a problem where component inside
<ClientOnly>
tag (orcmp.client.vue
) is not rendered at all when using Sanity query.The error message from the console is:
If I remove any of the Sanity composables (
useSanityQuery
oruseLazySanityQuery
), the client component will be rendered normallyWorkaround
A workaround (or intended feature) I found is to enable
minimal: true
for Sanity insidenuxt.config.ts
Reproduction
You can clone these apps to test. But they are entirely fresh so any inited apps will do.
Note:
I tried to reproduce on StackBlitz here but the issue does not occur. The only difference is I'm using
pnpm
for local development whereas StackBlitz usesnpm
(and its other env)System
The text was updated successfully, but these errors were encountered: