-
-
Notifications
You must be signed in to change notification settings - Fork 623
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
Error on Nuxt Content for Static Site Generation : Document not found, overwrite this content with #not-found slot in <ContentDoc>. #2726
Comments
Hello @dawadam , I'm also interested in this bug. Is it possible to prepare this bug reproduction environment in StackBlitz? |
@dawadam Have you solved the problem? |
I had the same issue, using this undocumented experimental flag fixed it: |
It's surprising that this solution is so hidden. After spending hours trying to troubleshoot, simply adding this parameter to the Nuxt config resolved everything:
This option isn’t even mentioned in the main documentation: https://content.nuxt.com/get-started/configuration#experimental Is there a specific reason why this isn’t documented? |
Thanks for that. |
Thanks for that. This worked for me: |
Hi @dawadam , Has this issue already been resolved? |
I will give it a try to verify. |
Installation (Nuxt + Content) :
Change the configuration in export default defineNuxtConfig({
ssr: false,
// ...
}); Starting development:
Go to the article slug page:
Working as expected: "About Content v2" Generating for production:
Starting preview:
Go to the article slug page:
See error:
Apply @Adeiko's suggestion in export default defineNuxtConfig({
ssr: false,
content: {
experimental: {
clientDB: true
}
},
// ...
}); Generating for production:
Starting preview:
Go to the article slug page:
Now it works: "About Content v2" It should be added to the documentation! :) PS : @shinGangan i'm not usung StackBlitz |
Environment
Reproduction
Just install fresh nuxt and module
@nuxt/content
.Add a markdown file in "content" folder.
Add a page in "pages" folder with
<ContentDoc />
Add to nuxt config :
ssr:false
Run in dev :
npm run dev
Appreciate markdown render
Generate
npm run generate
Check live
npm run preview
See error :
Document not found, overwrite this content with #not-found slot in <ContentDoc>.
Describe the bug
When using Nuxt Content with markdown files.
It works fine in development and when I generate production builds.
The problem occurs when I try to disable SSR (Server-Side Rendering).
An error appears when loading a markdown file:
Document not found, overwrite this content with #not-found slot in <ContentDoc>.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: