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

[v3] Page not found on preview after generate #3043

Open
brokuka opened this issue Jan 26, 2025 · 1 comment
Open

[v3] Page not found on preview after generate #3043

brokuka opened this issue Jan 26, 2025 · 1 comment

Comments

@brokuka
Copy link

brokuka commented Jan 26, 2025

Environment



Version

v3

Reproduction

// ~/pages/[...slug].vue

<script setup lang="ts">
const route = useRoute()

const { data } = await useAsyncData(route.path, () => queryCollection('docs').path(route.path).first())
</script>

<template>
  <ContentRenderer v-if="data" :value="data" />
</template>

Content

Add some pages in content folder.

For example:

Image

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 have blog page there will be throwing error.

Additional context

No response

Logs

@thorge
Copy link

thorge commented Feb 1, 2025

Same here. Maybe someone can elaborate on how to make static builds work?

In dev mode everything works fine. I tried both ssr: true/false. Pages are empty after build.

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

2 participants