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.
C
Chaika13d ago
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
K
Ken13d ago
Hi Chaika, I do not see a top level index.html. It's in a subfolder "app"
File name
BUILD_ID
app-build-manifest.json
app-path-routes-manifest.json
build-manifest.json
export-marker.json
images-manifest.json
next-minimal-server.js.nft.json
next-server.js.nft.json
package.json
prerender-manifest.js
prerender-manifest.json
react-loadable-manifest.json
required-server-files.json
routes-manifest.json
trace

cache
.tsbuildinfo
config.json

eslint

webpack

server
app-paths-manifest.json
font-manifest.json
functions-config-manifest.json
middleware-build-manifest.js
middleware-manifest.json
middleware-react-loadable-manifest.js
next-font-manifest.js
next-font-manifest.json
pages-manifest.json
server-reference-manifest.js
server-reference-manifest.json
webpack-runtime.js

app
_not-found.html
_not-found.js
_not-found.js.nft.json
_not-found.meta
_not-found.rsc
_not-found_client-reference-manifest.js
favicon.ico.body
favicon.ico.meta
index.html
index.meta
index.rsc
page.js
page.js.nft.json
page_client-reference-manifest.js

favicon.ico

chunks

pages
404.html
500.html
_app.js
_app.js.nft.json
_document.js
_document.js.nft.json
_error.js
_error.js.nft.json

static

chunks

css

media

wcJh-JHbU9ZpY9aQI0HoC

types
package.json

app
layout.ts
page.ts
File name
BUILD_ID
app-build-manifest.json
app-path-routes-manifest.json
build-manifest.json
export-marker.json
images-manifest.json
next-minimal-server.js.nft.json
next-server.js.nft.json
package.json
prerender-manifest.js
prerender-manifest.json
react-loadable-manifest.json
required-server-files.json
routes-manifest.json
trace

cache
.tsbuildinfo
config.json

eslint

webpack

server
app-paths-manifest.json
font-manifest.json
functions-config-manifest.json
middleware-build-manifest.js
middleware-manifest.json
middleware-react-loadable-manifest.js
next-font-manifest.js
next-font-manifest.json
pages-manifest.json
server-reference-manifest.js
server-reference-manifest.json
webpack-runtime.js

app
_not-found.html
_not-found.js
_not-found.js.nft.json
_not-found.meta
_not-found.rsc
_not-found_client-reference-manifest.js
favicon.ico.body
favicon.ico.meta
index.html
index.meta
index.rsc
page.js
page.js.nft.json
page_client-reference-manifest.js

favicon.ico

chunks

pages
404.html
500.html
_app.js
_app.js.nft.json
_document.js
_document.js.nft.json
_error.js
_error.js.nft.json

static

chunks

css

media

wcJh-JHbU9ZpY9aQI0HoC

types
package.json

app
layout.ts
page.ts
C
Chaika13d ago
looks like it's in /server/app to me https://00b12475.mooovers-web.pages.dev/server/app/
Mooovers - Stock Market Calendar
Track Earnings, IPOs, and more.
C
Chaika13d ago
Under Settings -> builds & Deployments -> Build Configurations, you can edit your configuration and set your Build Output directory to server/app and then rerun the build
K
Ken13d ago
I tried that, but the deployment failed
2024-04-03T01:01:00.34523Z Executing user command: npm run build
2024-04-03T01:01:00.918133Z
2024-04-03T01:01:00.918463Z > my-project@0.1.0 build
2024-04-03T01:01:00.918664Z > next build
2024-04-03T01:01:00.918758Z
2024-04-03T01:01:01.494324Z ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
2024-04-03T01:01:01.4987Z Attention: Next.js now collects completely anonymous telemetry regarding usage.
2024-04-03T01:01:01.498871Z This information is used to shape Next.js' roadmap and prioritize features.
2024-04-03T01:01:01.499035Z You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2024-04-03T01:01:01.499157Z https://nextjs.org/telemetry
2024-04-03T01:01:01.499317Z
2024-04-03T01:01:01.596343Z ▲ Next.js 14.1.4
2024-04-03T01:01:01.596651Z
2024-04-03T01:01:01.655344Z Creating an optimized production build ...
2024-04-03T01:01:11.662252Z ✓ Compiled successfully
2024-04-03T01:01:11.663146Z Linting and checking validity of types ...
2024-04-03T01:01:13.87345Z Collecting page data ...
2024-04-03T01:01:15.00651Z Generating static pages (0/5) ...
2024-04-03T01:01:15.583921Z
Generating static pages (1/5)
2024-04-03T01:01:15.709021Z
Generating static pages (2/5)
2024-04-03T01:01:15.709318Z
Generating static pages (3/5)
2024-04-03T01:01:15.713027Z
✓ Generating static pages (5/5)
2024-04-03T01:01:16.177612Z Finalizing page optimization ...
2024-04-03T01:01:16.177872Z Collecting build traces ...
2024-04-03T01:01:21.223334Z
2024-04-03T01:01:21.226512Z Route (app) Size First Load JS
2024-04-03T01:01:21.226743Z ┌ ○ / 136 B 84.4 kB
2024-04-03T01:01:21.226837Z └ ○ /_not-found 885 B 85.2 kB
2024-04-03T01:01:21.22693Z + First Load JS shared by all 84.3 kB
2024-04-03T01:01:21.227049Z ├ chunks/69-1656e2cc92fa6e80.js 29.1 kB
2024-04-03T01:01:21.227175Z ├ chunks/fd9d1056-d03af0e963d7a2f3.js 53.4 kB
2024-04-03T01:01:21.227303Z └ other shared chunks (total) 1.86 kB
2024-04-03T01:01:21.227681Z
2024-04-03T01:01:21.227799Z
2024-04-03T01:01:21.228084Z ○ (Static) prerendered as static content
2024-04-03T01:01:21.228205Z
2024-04-03T01:01:21.274573Z Finished
2024-04-03T01:01:21.275431Z Note: No functions dir at /functions found. Skipping.
2024-04-03T01:01:21.275643Z Validating asset output directory
2024-04-03T01:01:21.275888Z Error: Output directory "server/app" not found.
2024-04-03T01:01:25.09199Z Failed: build output directory not found
2024-04-03T01:01:00.34523Z Executing user command: npm run build
2024-04-03T01:01:00.918133Z
2024-04-03T01:01:00.918463Z > my-project@0.1.0 build
2024-04-03T01:01:00.918664Z > next build
2024-04-03T01:01:00.918758Z
2024-04-03T01:01:01.494324Z ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
2024-04-03T01:01:01.4987Z Attention: Next.js now collects completely anonymous telemetry regarding usage.
2024-04-03T01:01:01.498871Z This information is used to shape Next.js' roadmap and prioritize features.
2024-04-03T01:01:01.499035Z You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
2024-04-03T01:01:01.499157Z https://nextjs.org/telemetry
2024-04-03T01:01:01.499317Z
2024-04-03T01:01:01.596343Z ▲ Next.js 14.1.4
2024-04-03T01:01:01.596651Z
2024-04-03T01:01:01.655344Z Creating an optimized production build ...
2024-04-03T01:01:11.662252Z ✓ Compiled successfully
2024-04-03T01:01:11.663146Z Linting and checking validity of types ...
2024-04-03T01:01:13.87345Z Collecting page data ...
2024-04-03T01:01:15.00651Z Generating static pages (0/5) ...
2024-04-03T01:01:15.583921Z
Generating static pages (1/5)
2024-04-03T01:01:15.709021Z
Generating static pages (2/5)
2024-04-03T01:01:15.709318Z
Generating static pages (3/5)
2024-04-03T01:01:15.713027Z
✓ Generating static pages (5/5)
2024-04-03T01:01:16.177612Z Finalizing page optimization ...
2024-04-03T01:01:16.177872Z Collecting build traces ...
2024-04-03T01:01:21.223334Z
2024-04-03T01:01:21.226512Z Route (app) Size First Load JS
2024-04-03T01:01:21.226743Z ┌ ○ / 136 B 84.4 kB
2024-04-03T01:01:21.226837Z └ ○ /_not-found 885 B 85.2 kB
2024-04-03T01:01:21.22693Z + First Load JS shared by all 84.3 kB
2024-04-03T01:01:21.227049Z ├ chunks/69-1656e2cc92fa6e80.js 29.1 kB
2024-04-03T01:01:21.227175Z ├ chunks/fd9d1056-d03af0e963d7a2f3.js 53.4 kB
2024-04-03T01:01:21.227303Z └ other shared chunks (total) 1.86 kB
2024-04-03T01:01:21.227681Z
2024-04-03T01:01:21.227799Z
2024-04-03T01:01:21.228084Z ○ (Static) prerendered as static content
2024-04-03T01:01:21.228205Z
2024-04-03T01:01:21.274573Z Finished
2024-04-03T01:01:21.275431Z Note: No functions dir at /functions found. Skipping.
2024-04-03T01:01:21.275643Z Validating asset output directory
2024-04-03T01:01:21.275888Z Error: Output directory "server/app" not found.
2024-04-03T01:01:25.09199Z Failed: build output directory not found
Could this be an issue with the domain instead?
C
Chaika13d ago
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
K
Ken13d ago
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!
Want results from more Discord servers?
Add your server
More Posts
Trying to host a NextJS project on Cloudflare. Error: Output directory "out" not found.Hi all, I've managed to host some non-NextJS projects fine, but this one is getting me a little stuProduction workers 100% errorsRandomly started getting 500 errors in production env workers `{ "outcome": "exception", "scripCan Cloudflare Pages be deployed under a domain Route?We’d like to use cloudflare pages for a single-page application but without having pages take over tNot able to uplod file on cloudinary.How can i upload files to Cloudinary in the Hono app? Everything is sorted but i am not able to get Production IssueI have made a small change in code in GitHub, But it's only being updated in my aliase domain given axum/examples/tracing-aka-logging/src/ma...Thanks. I'm trying to get this working combined with the tracing example in the axum repo https://gi`wrangler tail` with WebSocketsIs this not true for any incoming Websocket requests? - I have a console log inside of the `websockeenv variables are empty - HonoHello can you help me with some small example how to work locally with env variables? I tried c.env.I will check that out. Thank you! Do youI will check that out. Thank you! Do you mind me asking what tech stack you use? Do you try to use a522 ErrorHi all, I tried updating the CNAME from '@' to 'www.' so I can so more dynamic stuff with multi-repwrangler preview output is not the same as liveHello all, finally I got my astro project buildable. Using `wrangler pages dev ./dist` my website lWhat headers come back?I have one question. If I use Azure and I move to ai gateway will I still be able to receive the heaMultiple Set-Cookie headers folded into one headerIn the documentation (https://developers.cloudflare.com/workers/runtime-apis/headers/), it says thatCloudflare Tunnel routing through wrong locationsI have a tunnel that I use as an alternative to opening ports on my local network, however, there isRegister DomainHi. I cant pay for new .com domain. I can't figure out what could be the problem. The bank side saysCloudflare icons and stencils for diagramming.Do we have an open source repository with Cloudflare-specific icons?"Pro" plan, but can't see the Caching page.Hi there, I've subscribed to the "Pro" plan, but it seems I don't have access to the "Caching - Ovecan you provide an url for mp3?can you provide an url for mp3?Downloading data before building pages (SSG/SSR)I have the use case that I'm experimenting building a Cloudflare Pages project using Astro. It willJust the domain is neededJust the domain is needed