Self-hosting on Cloudflare issue

Anyone else getting deployment issues on Cloudflare self-hosted projects? I have one project I setup to deploy the project to a dev branch on Github, which Cloudflare automatically detects and deploys on a staging domain. That has worked for months.

I’m now trying to configure another project with the exact same setup, and it seems like there is a corruption in the files that get sent to Github and/or the config files. Using Claude, it says it’s an output directory issue and is suggesting to change from the /dist to . Claude also reviewed the vite.config.js file from and noticed that it is using ‘rolldownOptions’ instead of ‘rollupOptions’. I have no idea what that does, but I’m skeptical that it is an issue because the project that does deploy correctly uses it too.

I’ve sent a message via support chat and waiting to hear back.

Rolldown is the same thing as Rollup, but much faster. It might indeed ve most likely be misconfigured / differently configured though, so this change might make the old setup fail. Did you try changing the directory?

1 Like

something to check. Make sure you’re deploying to Cloudflare Pages and not a worker. I’ve run into that before as Cloudflare is making the pages a little less obvious of a button (since they want you to move to workers)

1 Like

I did end up getting the project to deploy on Cloudflare with a combination of deleting the Github repository and Cloudflare Page and starting fresh from scratch. One thing I may have initially done incorrectly, was choose a framework preset. This last time I chose none.

It still wouldn’t deploy until I changed the vite.config.js to use rollupOptions. Claude walked me through updating the package.json to add a prebuild script to automatically update the vite.config.js file prior to deploy, which Claude also helped me add to the repo.

It works now, just half a day messing around with it….

1 Like