commerce
commerce copied to clipboard
404 page is not loading
pages/404.tsx is not being picked up by Next.js - https://github.com/vercel/commerce/blob/main/pages/404.tsx
This file has the text The requested page doesn't exist or you don't have access to it.
But the 404 page looks like the default Next.js one e.g. https://demo.vercel.store/foo-bar shows This page could not be found.
This means we can't set our own custom 404 page :smiley:
I have partially solved this using the _error.tsx page. In this case it is picked-up.
However, this is not a long term fix as according to the docs you should use 404.tsx or 500.tsx pages accordingly.