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

404 page only work with /404 route. #48

Closed
RayGuo-ergou opened this issue Dec 31, 2022 · 5 comments
Closed

404 page only work with /404 route. #48

RayGuo-ergou opened this issue Dec 31, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@RayGuo-ergou
Copy link

When entering any unknown route, it will only show Document not found unless I use the /404 route.

example

@RayGuo-ergou
Copy link
Author

I have tried to create ~/error.vue and ~/layouts/error.vue but both does not work.

@viandwi24 viandwi24 added the bug Something isn't working label Dec 31, 2022
@viandwi24 viandwi24 self-assigned this Dec 31, 2022
@sankhaKarunasekara
Copy link

Please update your node version to the latest and use pnpm instead of npm. It worked for me.

@RayGuo-ergou
Copy link
Author

Please update your node version to the latest and use pnpm instead of npm. It worked for me.

This bug even exists in template production (Please check the URL I provided).

@wwbluechip
Copy link

I have tried to create ~/error.vue and ~/layouts/error.vue but both does not work.

in nuxt.config.ts, turn documentDriven to false

@RayGuo-ergou
Copy link
Author

in nuxt.config.ts, turn documentDriven to false

Cheers, it works.

@viandwi24 After reading the Nuxt content document: This mode creates a direct binding between the content/ directory and pages. I reckon that this configuration is supposed to be set as false in this project. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants