Failing build at the end

Hello, I am having a problem with building my app. After all the necessary processes are completed and the server starts, I wait for the build to finish. However, after approximately 30 minutes, it fails with the error message “Failed: an internal error occurred,” which is very vague.

I cloned your repository and have deployed without issue. Not sure why it has failed for you. My only suggestion is to delete the project and start again.

I do see there is a status on the repository showing the build was started almost 1h 30m ago. Not sure if this will disappear when you remove the project or if it may require further step like removing the integration from GitHub completely then relinking.

I tried both things but still effect remains the same. Nonetheless thank you for reply and trying

What’s your build command? Are you trying to run a server or build static assets?

In addition, can you please share your deployment ID?

The Pages deployment ID is a unique build identifier. It’s the UUID in the browser bar (for example, a URL would be where the deployment ID looks something like a398d794-7322-4c97-96d9-40b5140a8d9b). This ID can help troubleshoot some issues with Pages builds so if you have a failing build make sure you grab that ID for the Pages team to use.

With that, a member of the Pages team should be able to look this up and see what’s happening for you.

1 Like

yes, sure, here is the ID: 37158cc9-eada-4324-9bfc-06fb3025dd65. I am trying to run a server and my build command is my custom: npm start - it executes node server/app.js && npm run dev

Cloudflare Pages is for static content (HTML, CSS, JS, images and other such files). It will not run a webserver such as Express, Koa or the likes. If you’re using those to serve static content then you can just remove that part and use Pages!

If you’re doing more dynamic content you can use Functions (Functions · Cloudflare Pages docs). It will run code on request (so still not a webserver in the conventional sense). This would allow for more dynamic content though especially with KV (Key Value storage) and Durable Objects (transactional data storage). Functions are natively integrated with Pages so are super easy to get up and running along your website.
Otherwise, a good old VPS or dedicated server from one of the many hosts out there is for you.

1 Like

ok thank you for claryfing, so how can I run a fullstack web app on cloudflare, including frontend and backend

With Functions:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.