Gatsby 5 DSG function returning 404 for all pages

To implement DSG I used the flag defer: true for the createPage block inside gatsby-config.js, which is working fine in local build, but when deployed to netlify, all the pages are returning 404

Hi there,

Did you see this guide yet? This is the best place to start for “Page Not Found” issues.

If you are still seeing issues after following the troubleshooting steps in there, please check out this Support Guide as well. It outlines all of our build and deploy resources and will get you on the right track :slight_smile:

If none of the above resources help, please write back with your site name and what steps you have tried and we can look into this further!

@SamO Hi! Thanks for responding, I was testing DSG in Gatsby 5…it is running well in local build, but when deployed to netlify all the pages created with createPage are throwing 404,
I can see the pages being created in builds logs
Here’s the deploy link:
GitHub Repo Link: GitHub - eram-iw/Testing-DSG

Hi @eram,

Thanks for sharing your repo. This appears to be a bug on our end and we’ve filed it for the devs to take a look at.

Hi there!!! Thank you for addressing the issue! Waiting for the issue to be fixed!!! :smiley:

Hi @eram,

The problem here appears to be that you need to install gatsby-plugin-netlify and add it to your gatsby.config.js manually for this to work.