Deploying Bolt.diy with Cloudflare Pages (the easy way!)

Did you set the compatibility flags and re-deploy?

Yes bro and i still get wrangler error after re-deploy. Check ss please

No wrangler.toml file found. Contiuing.” is expected behavior and it’s more INFO than a warning or error. Did you also delete the other file mentioned (the .tool-versions file)? If you could, it would probably be better if you could drop the entire log here and put it in code blocks ``` (which will make it scroll and not take pages of space in the thread).

Yes i did deletion of .tool-versions, here is the complete log :

2025-01-26T21:35:21.295659Z	Cloning repository...
2025-01-26T21:35:21.931446Z	From https://github.com/mindfreak0/bolt.diy
2025-01-26T21:35:21.931914Z	 * branch            bc23412e8470c9e24165414492b96031b7b57089 -> FETCH_HEAD
2025-01-26T21:35:21.932021Z	
2025-01-26T21:35:21.978862Z	HEAD is now at bc23412 Delete wrangler.toml
2025-01-26T21:35:21.979468Z	
2025-01-26T21:35:22.055992Z	
2025-01-26T21:35:22.056559Z	Using v2 root directory strategy
2025-01-26T21:35:22.079777Z	Success: Finished cloning repository files
2025-01-26T21:35:23.50945Z	Checking for configuration in a Wrangler configuration file (BETA)
2025-01-26T21:35:23.510389Z	
2025-01-26T21:35:23.613935Z	No wrangler.toml file found. Continuing.
2025-01-26T21:35:24.428003Z	Failed: an internal error occurred. If this continues, contact support: https://cfl.re/3WgEyrH

This is the image of github files

Without knowing more information, I’m not going to be able to really help here. The log message is not really helpful. Can you please confirm your build command is npm install pnpm & pnpm install & pnpm run build? Looking at the log, it appears to be failing on the step that would usually be install pnpm but I’m not sure.

image

And despite re-deploying an instance, I could not replicate your issue… regardless of what changes I seemed to make.

Seems my problem is a bit complicated :laughing: , sorry bro
i want to mention that i added only open router api and not all API in .env file
also here is the build config

Does this 100% work for anyone or does it get stuck like here? https://thinktank.ottomator.ai/t/bolt-diy-on-cloudflare-becomes-seems-stuck

3 completely different issues. This was a setup issue, the one linked was an issue where the Cloudflare build gets stuck and stops responding… your issue was a problem with your AI/LLM and not Bolt.diy itself. I responded in the other thread with additional details.

hi, I followed this guide but i got [22:17:17.965 :sparkles: Upload complete!
22:17:21.372 Success: Assets published!
22:17:23.857 Error: Failed to publish your Function. Got error: No such compatibility flag: nodejs_compat] error. how to fix? someone did [node.js - nodejs_compat is not working on Cloudflare Pages - Stack Overflow] which i don’t understand a bit.

You just didn’t set the flags. Complete step #10 in “Setting up Cloudflare” above. And then complete the rest of the steps and re-deploy.

I actually did.I did everything as you said.

FIXED: i changed branch stable to main then again vice versa.and it’s fixed!!

1 Like

managed to deploy! thanks to you, but the process is quite slow and the preview is not working, can you give suggestion?

What process is slow and what do you mean the preview is not working? In the Bolt.diy deployment itself or do you mean while using it? The deployment process should really only take ~5 minutes once you get familiar. As for using Bolt.diy, this method runs mostly client side, so it has more to do with the AI API you choose, your connection, and system (performance, utilization, etc.).

thanks alias! to clarify, the deployment to the cloud fare is smooth. so its more from performance when using bolt.diy my side , PC performance, internet speed. will try to bring videos when it happens.

Just installed this with the instructions and the zero trust, works great and building some automation into my daily. My only question or issue is that the chat history does not save. While the cloudflare platform is new to me, I just dont know what I am missing.

For example, I switch from my desktop at home to my laptop at work and the chat are not shared, even when I close down and then come back to it, the chat history is gone.

Thanks.

1 Like

It’s because the history saves to browser storage, so it’s machine, browser and user specific. Because it stores locally to the device, history won’t carry to the other device.

2025-02-14T20:17:58.502892Z Cloning repository…
2025-02-14T20:17:59.102529Z From GitHub - Zeemun/bolt.diy: Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
2025-02-14T20:17:59.102954Z * branch ecf3cad189be80bff1dc1efdac9614f4e825fe88 → FETCH_HEAD
2025-02-14T20:17:59.103046Z
2025-02-14T20:17:59.148963Z HEAD is now at ecf3cad chore: release version 0.0.6
2025-02-14T20:17:59.149419Z
2025-02-14T20:17:59.223114Z
2025-02-14T20:17:59.223507Z Using v2 root directory strategy
2025-02-14T20:17:59.243402Z Success: Finished cloning repository files
2025-02-14T20:18:00.757612Z Checking for configuration in a Wrangler configuration file (BETA)
2025-02-14T20:18:00.758329Z
2025-02-14T20:18:00.759954Z Found wrangler.toml file. Reading build configuration…
2025-02-14T20:18:00.766111Z pages_build_output_dir: build/client
2025-02-14T20:18:00.766242Z Build environment variables: (none found)
2025-02-14T20:18:01.858942Z Successfully read wrangler.toml file.
2025-02-14T20:18:01.922957Z Found a .tool-versions file in user-specified root directory. Installing dependencies.
2025-02-14T20:18:02.310622Z pnpm plugin is not installed
2025-02-14T20:18:02.313445Z Error: Exit with error code: 1
2025-02-14T20:18:02.313637Z at ChildProcess. (/snapshot/dist/run-build.js)
2025-02-14T20:18:02.313888Z at Object.onceWrapper (node:events:652:26)
2025-02-14T20:18:02.314049Z at ChildProcess.emit (node:events:537:28)
2025-02-14T20:18:02.314166Z at ChildProcess._handle.onexit (node:internal/child_process:291:12)
2025-02-14T20:18:02.321604Z Failed: build command exited with code: 1
2025-02-14T20:18:03.289906Z Failed: error occurred while running build command

Can somebody help, this is how the log looks like. I followed step by step the full guide.

Looks like you did not exactly follow, as the wrangler.toml and .tool-version file is still there. Maybe you picked then the wrong branch and not the one where you deletet the files?

You can also follow my video on installing it based on this guide:

1 Like

Can someone help me? I’m having this error when I build it. The build was successful but this is shown when I enter the page:

Application Error

x@cloudflarelink/assets/_index-C0TZAjcZ.js:1:386
Mu@cloudflarelink/assets/components-02vRLH4O.js:38:16998
dh@cloudflarelink/assets/components-02vRLH4O.js:40:43920
sh@cloudflarelink/assets/components-02vRLH4O.js:40:39692
Fv@cloudflarelink/assets/components-02vRLH4O.js:40:39620
Bi@cloudflarelink/assets/components-02vRLH4O.js:40:39474
Ka@cloudflarelink/assets/components-02vRLH4O.js:40:35853
oh@cloudflarelink/assets/components-02vRLH4O.js:40:34804
_@cloudflarelink/assets/components-02vRLH4O.js:25:1570
G@cloudflarelink/assets/components-02vRLH4O.js:25:1938

There should be a link there at ‘cloudflarelink’ but I blocked it out because I can’t send more than 2 links