404 new React App
Hi Everyone, I usually use Netlify to host a simple static page but wanted to give Cloudflare Pages a try. When I deploy, it looks like a "success" in the build logs but when I visit the dev link https://00b12475.mooovers-web.pages.dev I get a 404.
7 Replies
When you're looking at the Build logs, click on the Assets Uploaded tab. Do you have a top-level index.html?
(Click "View Details" on the deployment -> Assets Uploaded)
Magic link to Assets Uploaded: https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/:pages-deployment/files
Hi Chaika, I do not see a top level index.html. It's in a subfolder "app"
Mooovers - Stock Market Calendar
Track Earnings, IPOs, and more.
Under Settings -> builds & Deployments -> Build Configurations, you can edit your configuration and set your Build Output directory to
server/app
and then rerun the buildI tried that, but the deployment failed
Could this be an issue with the domain instead?
That's next.js, not exactly react
no
There's a build template for Next.js static html export, but doesn't support all features, some limitations like with wildcard paths and such.
There's also next-on-pages: https://github.com/cloudflare/next-on-pages, which supports the Edge Runtime and some of those more advanced features
Ohh I see, I should have mentioned that I don't do web dev often so I confused the two. Let me read that over, thank you!