Can I install bolt.diy in Termux android

I’m also trying to run bolt.diy on android but having problems when I try to install pnpm, can you help?

…/node_modules/workerd postinstall$ node inst…
│ /data/data/com.termux/files/home/bolt.diy/nod…
│ throw new Error(`Unsupported platform: ${…
│ ^
│ Error: Unsupported platform: android arm64 LE
│ at pkgAndSubpathForCurrentPlatform (/data…
│ at checkAndPreparePackage (/data/data/com…
│ at Object. (/data/data/com.ter…
│ at Module._compile (node:internal/modules…
│ at Module._extensions…js (node:internal/…
│ at Module.load (node:internal/modules/cjs…
│ at Module._load (node:internal/modules/cj…
│ at TracingChannel.traceSync (node:diagnos…
│ at wrapModuleLoad (node:internal/modules/…
│ at Function.executeUserEntryPoint [as run…
│ Node.js v23.6.1
└─ Failed in 181ms at /data/data/com.termux/files/home/bolt.diy/node_modules/.pnpm/workerd@1.20241106.1/node_modules/workerd
ELIFECYCLE Command failed with exit code 1.

can you try with nodejs version 22. I think 23 is still not supportet with bolt.

My error when I try this code:

~/bolt.diy $ export NODE_OPTIONS=“–max-old-space-size=2048”
export TCMALLOC_DISABLE=1
pnpm run dev

bolt@0.0.6 dev /data/data/com.termux/files/home/bolt.diy
node pre-start.cjs && remix vite:dev

★═══════════════════════════════════════★
B O L T . D I Y
:zap: Welcome :zap:
★═══════════════════════════════════════★

:round_pushpin: Current Version Tag: v"0.0.6"
:round_pushpin: Current Commit Version: “ecf3cad”
Please wait until the URL appears here
★═══════════════════════════════════════★
/data/data/com.termux/files/usr/bin/sh: 1: remix: not found
ELIFECYCLE Command failed.

Used proot-distro to get node 22.14.0 and now this error:

Running postinstall script…
…/node_modules/workerd postinstall$ node inst…
│ /host/bolt.diy/node_modules/.pnpm/workerd@1.2…
│ throw new Error(`Unsupported platform: ${…
│ ^
│ Error: Unsupported platform: android arm64 LE
│ at pkgAndSubpathForCurrentPlatform (/host…
│ at checkAndPreparePackage (/host/bolt.diy…
│ at Object. (/host/bolt.diy/nod…
│ at Module._compile (node:internal/modules…
│ at Module._extensions…js (node:internal/…
│ at Module.load (node:internal/modules/cjs…
│ at Module._load (node:internal/modules/cj…
│ at TracingChannel.traceSync (node:diagnos…
│ at wrapModuleLoad (node:internal/modules/…
│ at Function.executeUserEntryPoint [as run…
│ Node.js v23.6.1
└─ Failed in 281ms at /host/bolt.diy/node_modules/.pnpm/workerd@1.20241106.1/node_modules/workerd
node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild: Running postinstall script…
node_modules/.pnpm/esbuild@0.23.1/node_modules/esbuild: Running postinstall script…
ELIFECYCLE Command failed with exit code 1.

looks like it is still using version 23. make sure it uses 22 :slight_smile:

pnpm run dev

bolt@0.0.6 dev /host/bolt.diy
node pre-start.cjs && remix vite:dev

★═══════════════════════════════════════★
B O L T . D I Y
:zap: Welcome :zap:
★═══════════════════════════════════════★

:round_pushpin: Current Version Tag: v"0.0.6"
:round_pushpin: Current Commit Version: “ecf3cad”
Please wait until the URL appears here
★═══════════════════════════════════════★
warn Data fetching is changing to a single fetch in React Router v7
┃ You can use the v3_singleFetch future flag to opt-in early.
┃ → Future Flags (v2.13.1) | Remix

9432 external/com_google_tcmalloc/tcmalloc/system-alloc.cc:771] MmapAligned() failed - unable to allocate with tag (hint=0x4eacc0000000, size=1073741824, alignment=1073741824) - is something limiting address placement?
9432 external/com_google_tcmalloc/tcmalloc/arena.cc:52] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes=131072, object-size=640); is something preventing mmap from succeeding (sandbox, VSS limitations)?
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at Miniflare2.#assembleAndUpdateConfig (/host/bolt.diy/node_modules/.pnpm/miniflare@3.20241106.1/node_modules/miniflare/src/index.ts:1404:10)
at processTicksAndRejections (node:internal/process/task_queues:105:5)
at Mutex.runWith (/host/bolt.diy/node_modules/.pnpm/miniflare@3.20241106.1/node_modules/miniflare/src/workers/shared/sync.ts:66:45)
at Miniflare2.#waitForReady (/host/bolt.diy/node_modules/.pnpm/miniflare@3.20241106.1/node_modules/miniflare/src/index.ts:1486:3)
at Miniflare2.getProxyClient (/host/bolt.diy/node_modules/.pnpm/miniflare@3.20241106.1/node_modules/miniflare/src/index.ts:1692:3)
at Miniflare2.getBindings (/host/bolt.diy/node_modules/.pnpm/miniflare@3.20241106.1/node_modules/miniflare/src/index.ts:1715:23)
at getPlatformProxy (/host/bolt.diy/node_modules/.pnpm/wrangler@3.91.0
@cloudflare+workers-types@4.20241127.0/node_modules/wrangler/src/api/integrations/platform/index.ts:116:24)
at configureServer (/host/bolt.diy/node_modules/.pnpm/@remix-run+dev@2.15.0_@remix-run+react@2.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_typ_3djlhh3t6jbfog2cydlrvgreoy/node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at createServer (file:///host/bolt.diy/node_modules/.pnpm/vite@5.4.11@types+node@22.10.1_sass-embedded@1.81.0/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:63080:20)
at configResolved (/host/bolt.diy/node_modules/.pnpm/@remix-run+dev@2.15.0_@remix-run+react@2.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_typ_3djlhh3t6jbfog2cydlrvgreoy/node_modules/@remix-run/dev/dist/vite/plugin.js:768:27)
at async Promise.all (index 3)
at resolveConfig (file:///host/bolt.diy/node_modules/.pnpm/vite@5.4.11_@types+node@22.10.1_sass-embedded@1.81.0/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:66404:3)
at createServer (file:///host/bolt.diy/node_modules/.pnpm/vite@5.4.11@types+node@22.10.1_sass-embedded@1.81.0/node_modules/vite/dist/node/chunks/dep-CB_7IfJ-.js:62758:18)
at dev (/host/bolt.diy/node_modules/.pnpm/@remix-run+dev@2.15.0_@remix-run+react@2.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_typ_3djlhh3t6jbfog2cydlrvgreoy/node_modules/@remix-run/dev/dist/vite/dev.js:39:16)
at Object.viteDev (/host/bolt.diy/node_modules/.pnpm/@remix-run+dev@2.15.0_@remix-run+react@2.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_typ_3djlhh3t6jbfog2cydlrvgreoy/node_modules/@remix-run/dev/dist/cli/commands.js:221:3)
at Object.run (/host/bolt.diy/node_modules/.pnpm/@remix-run+dev@2.15.0_@remix-run+react@2.15.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_typ_3djlhh3t6jbfog2cydlrvgreoy/node_modules/@remix-run/dev/dist/cli/run.js:271:7) {
code: ‘ERR_RUNTIME_FAILURE’,
cause: undefined
}
ELIFECYCLE Command failed with exit code 1.

I tried this with Termux on Android and I got one of the same errors:

Error: Unsupported platform: android arm64 LE

I tried using both pkg install nodejs (23.6.1) and pkg install nodejs-lts (22.13.1) with npm install bolt.diy and no dice. Not sure if it’s the architecture or the platform but it doesn’t seem to work. I’ll test using the git repo next, but I don’t expect to have any better luck.

Technically you may be able to get it running on Docker though Android, but I would imagine it works be a virtualized layer on top, so you could see some overhead and would want to make sure you have the resources (such as RAM if on phone/mobile or a Chromebook, etc.).

Update:

Using pnpm on Termux for Android can encounter permission issues due to hardlinks not being allowed on Android.

I tried it with git clone {URL} with npm install and pnpm install in the folder, but could get nothing to work. Tried various versions of node also… Just keep getting the same unsupported error.

I think there is an inherent compatibility issue here and it seems similar to a miniflare issue known to Windows 11, and I think it might be largely due to how symbolic linking works, but I’m not sure. Has anyone else gotten bolt.diy to work on Android for Arm? And if so, what versions, specs, etc.

Any update? I was hoping to continue development from my phone on the go but can’t get it working

This is not a limitation of Bolt.diy, it’s either an android or pnpm specific issue, they would have to fix it. And good luck with Google doing that… response to the pnpm thread online state “Hardlinks are not allowed on Android” and that’s fundamentally how pnpm works. You might have luck using the build version, but I haven’t tested it.

pnpm permission denied · Issue #4924 · termux/termux-packages

Another possible option would be to use the --no-bin-links flag with pnpm which shouldn’t create symbolic links at all:
node.js - npm install: when to use --no-bin-links? - Stack Overflow

P.S. I just tested npm, the flag options and build option… no good. The flags don’t turn of symbolic linking, just reduce it and the build is not really a PWA, so it gets installed basically the same way as using Git, just automated with an install script. No from the options I see, no dice. You would have to run full emulation or docker? on your android device.

Update: This is a little involved for me to do on my phone, but there are instructions for getting docker on Android, which could be a direction to go if you really want this, but it’s not for the faint of heart. Good luck!