2

I'm using nuxt generate option, and have a custom 404 page created with error.vue in layouts. In my nuxt.config.js I have the following:

generate: {
    exclude: [
      /styleguide$/,
      '/profile',
      '/schedule'
    ],
    fallback: '404.html'
  },

The 404 works like a charm on local dev, but not on live version. The website is deployed on s3 bucket. When I check my network, it returns status 200 when I hit non-existing route.

When i run generate in terminal I can see the following: Client-side fallback created: 404.html

I m trying to figuere out if I' m missing some configuration on cloudfront, or am I doing something wrong in nuxt?

Thank you so much in advance if anyone has any ideas, been stuck on it for days

  • Does this help you [https://stackoverflow.com/questions/58982541/nuxt-generate-static-site-with-a-fallback-file-for-all-dynamic-routes](https://stackoverflow.com/questions/58982541/nuxt-generate-static-site-with-a-fallback-file-for-all-dynamic-routes) ? – fatm Feb 07 '22 at 10:38
  • not really, as currently afte rconfiguring s3 bucket to go redirect to 404.html, it does that, but he 404 page is still blank. If I check the dist folder, the 404.html has only the initial setup, and non of teh styling from error.vue layout =(> I am wondering since the server returns staus 304 instead of 400 or 500, the eror.vue is never rendered since it is looking for an error status. Can that be the case? @fatm – Viktorija Valsoe Feb 07 '22 at 14:57
  • Hi, I have same problem, but i use VPS & nginx. Have you found a solution ? – kostikovmu Feb 08 '22 at 11:27

0 Answers0