viandwi24 / nuxt3-awesome-starter

a Nuxt 3 template and boilerplate with a lot of useful features. Nuxt 3 + Tailwindcss + Nuxt Layer
https://nuxt3-awesome-starter.vercel.app
1.69k stars 361 forks source link

404 page only work with ` /404 ` route. #48

Closed RayGuo-ergou closed 1 year ago

RayGuo-ergou commented 1 year ago

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

example

RayGuo-ergou commented 1 year ago

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

sankhaKarunasekara commented 1 year ago

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

RayGuo-ergou commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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?