-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
[v3] Page not found on preview after generate #3043
Comments
Same here. Maybe someone can elaborate on how to make static builds work? In dev mode everything works fine. I tried both Update: It works now, I forgot a |
Hi, facing the same issue, only thing that works for me is defining the final paths in the nitro prerender block: nitro: {
static: true,
prerender: {
routes: ["/sitemap.xml", "/", "/docs/getting-started/installation"],
},
}, |
@undefinedhuman You might want to try to crawl your links when pre-rendering. This only works, if there a links pointing to your pages: // nuxt.config.ts
nitro: {
prerender: {
crawlLinks: true
}
} |
I have the same issue with the V3 on an SPA Nuxt app. ReproductionJust take the i18n example from this repository: https://github.com/nuxt/content/tree/main/examples/i18n
it will work in dev mode but after
I will go back on V2 waiting a fix or maybe an explanation or doc with more details on static usage. I tried to remove the useAsyncData because it is static content, no ssr process:
But now, it is not anymore an HTTP 404 but there is an exception occuring in the method
|
I believe this is due to Nuxt generation and your HTTP server behavior. |
Using the command |
I ran into the same problem! |
I am also running into this issue when deploying on github pages. But my deployments of this repo on github pages are not working. Navigation to another page gives the error: This happens when this call is done: return await queryCollection('directory').path(`/dir/${lastSlug}`).first(); |
Should be fixed in #3245
I appreciate it if you can test and confirm the fix |
Environment
Version
v3
Reproduction
Content
Add some pages in
content
folder.For example:
Description
Note
Using
nuxt build
all pages works as expected.Getting 404 error on preview after generate
nuxt generate
. Works only page root/
, for example if you haveblog
page there will be throwing error.Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: