Hi, I'm experiencing an issue while querying localized content with Nuxt Content in a setup with SSR: false and experimental.clientDB enabled.
Following the suggestion in issue #2062, I enabled clientDB to make Nuxt Content work with static generation and ssr: false. Everything happily worked as expected until I tried filtering content by locale.
I'm on latest versions of Nuxt and Nuxt Content.
Here's a code example of how I'm filtering content by locale:
With .locale(locale.value) it doesn't retrieve anything, but if I disable the experimental DB client it works again.
Additional context
I'm using clientDB as suggested in issue #2062, because without it, querying content with SSR: false results in a 404 error on the generated content. I'm building an app with Capacitor and need to keep SSR: false; otherwise, the app size increases significantly (200MB with SSR vs. 24MB without).
Environment
Nuxt version: 3.14.159 Nuxt Content version: 2.13.4 SSR: false
Error happens during development and after server side content generation.
Reproduction
https://stackblitz.com/edit/sos-nuxt-content-npcvlj?file=nuxt.config.ts
It works with default language https://sosnuxtcontent-ewna--3000--f565b097.local-credentialless.webcontainer.io/omg/error
but not with secondary languages https://sosnuxtcontent-ewna--3000--f565b097.local-credentialless.webcontainer.io/it/omg/errore
Describe the bug
Hi, I'm experiencing an issue while querying localized content with
Nuxt Content
in a setup withSSR: false
andexperimental.clientDB
enabled.Following the suggestion in issue #2062, I enabled
clientDB
to makeNuxt Content
work with static generation andssr: false
. Everything happily worked as expected until I tried filtering content by locale.I'm on latest versions of Nuxt and Nuxt Content. Here's a code example of how I'm filtering content by locale:
With
.locale(locale.value)
it doesn't retrieve anything, but if I disable the experimental DB client it works again.Additional context
I'm using
clientDB
as suggested in issue #2062, because without it, querying content withSSR: false
results in a 404 error on the generated content. I'm building an app with Capacitor and need to keepSSR: false
; otherwise, the app size increases significantly (200MB with SSR vs. 24MB without).