[PR #3157] [MERGED] [codex] Fix Termux update build aborts #5822

Closed
opened 2026-10-22 04:19:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3157
Author: @SpicyMarinara
Created: 7/2/2026
Status: ✅ Merged
Merged: 7/2/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/issue-3156-termux-build-abort


📝 Commits (2)

  • 92ddc9c Fix Termux low-memory update builds
  • 1629f4b Harden pnpm install recovery

📊 Changes

14 files changed (+203 additions, -33 deletions)

View changed files

📝 docs/TROUBLESHOOTING.md (+27 -0)
📝 docs/installation/android-termux.md (+2 -2)
📝 packages/client/package.json (+1 -1)
➕ packages/client/scripts/build.mjs (+28 -0)
📝 packages/server/package.json (+1 -1)
➕ packages/server/scripts/build.mjs (+70 -0)
📝 packages/server/src/routes/updates.routes.ts (+15 -5)
📝 pnpm-workspace.yaml (+6 -1)
➕ scripts/check-workspace-install.mjs (+26 -0)
📝 start-termux.sh (+4 -4)
📝 start.bat (+9 -5)
📝 start.sh (+5 -5)
📝 win/installer/install.bat (+3 -3)
📝 win/installer/installer.nsi (+6 -6)

📄 Description

Linked issue

Closes #3156

Why this change

  • Android/Termux updates can abort during @marinara-engine/server build with exit status 134, which is consistent with a memory-heavy build step being killed or aborted on mobile devices.
  • Existing launchers and in-app update paths call the package build scripts, so the default scripts need to become Android-aware rather than relying on a new command old launchers would not call.
  • Released installs can also fail during pnpm install --frozen-lockfile with ERR_PNPM_TRUST_DOWNGRADE, and an aborted install can leave a partial node_modules that later fails shared builds with Cannot find module 'chess.js'.

What changed

  • Replaced the client and server package build scripts with small Node wrappers.
  • On desktop, the wrappers keep the existing strict builds: server tsc, client tsc -b plus Vite/PWA generation.
  • On Android/Termux, the server wrapper transpiles runtime JS with esbuild and copies runtime assets, while the client wrapper runs Vite with PWA generation disabled and skips the memory-heavy client typecheck.
  • Updated the in-app updater to build shared, server, and client sequentially on Android instead of running server/client builds in parallel.
  • Set pnpm workspace install behavior so release installs do not abort on trust downgrade metadata or non-interactive node_modules repair prompts.
  • Added launcher/installer pnpm flags and a workspace dependency sanity check so partial installs are repaired before builds.
  • Added Android and dependency-install troubleshooting docs.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm install --frozen-lockfile
  • node scripts/check-workspace-install.mjs
  • pnpm check
  • pnpm --filter @marinara-engine/shared build
  • MARINARA_LOW_MEMORY_BUILD=1 pnpm --filter @marinara-engine/server build
  • MARINARA_LOW_MEMORY_BUILD=1 pnpm --filter @marinara-engine/client build
  • pnpm --filter @marinara-engine/server build
  • pnpm --filter @marinara-engine/client build
  • pnpm --filter @marinara-engine/server lint
  • pnpm --filter @marinara-engine/client lint
  • pnpm --filter @marinara-engine/server test
  • pnpm version:check
  • node scripts/check-windows-installer-layout.mjs
  • git diff --check

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Not applicable; this is update/build plumbing and docs.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3157 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/2/2026 **Status:** ✅ Merged **Merged:** 7/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/issue-3156-termux-build-abort` --- ### 📝 Commits (2) - [`92ddc9c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/92ddc9caf6e928839749493b5c33bac764280a81) Fix Termux low-memory update builds - [`1629f4b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1629f4b75a534f5dea0f02b17b8cfd13fc6ca2b4) Harden pnpm install recovery ### 📊 Changes **14 files changed** (+203 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `docs/TROUBLESHOOTING.md` (+27 -0) 📝 `docs/installation/android-termux.md` (+2 -2) 📝 `packages/client/package.json` (+1 -1) ➕ `packages/client/scripts/build.mjs` (+28 -0) 📝 `packages/server/package.json` (+1 -1) ➕ `packages/server/scripts/build.mjs` (+70 -0) 📝 `packages/server/src/routes/updates.routes.ts` (+15 -5) 📝 `pnpm-workspace.yaml` (+6 -1) ➕ `scripts/check-workspace-install.mjs` (+26 -0) 📝 `start-termux.sh` (+4 -4) 📝 `start.bat` (+9 -5) 📝 `start.sh` (+5 -5) 📝 `win/installer/install.bat` (+3 -3) 📝 `win/installer/installer.nsi` (+6 -6) </details> ### 📄 Description ## Linked issue Closes #3156 ## Why this change - Android/Termux updates can abort during `@marinara-engine/server build` with exit status 134, which is consistent with a memory-heavy build step being killed or aborted on mobile devices. - Existing launchers and in-app update paths call the package `build` scripts, so the default scripts need to become Android-aware rather than relying on a new command old launchers would not call. - Released installs can also fail during `pnpm install --frozen-lockfile` with `ERR_PNPM_TRUST_DOWNGRADE`, and an aborted install can leave a partial `node_modules` that later fails shared builds with `Cannot find module 'chess.js'`. ## What changed - Replaced the client and server package `build` scripts with small Node wrappers. - On desktop, the wrappers keep the existing strict builds: server `tsc`, client `tsc -b` plus Vite/PWA generation. - On Android/Termux, the server wrapper transpiles runtime JS with esbuild and copies runtime assets, while the client wrapper runs Vite with PWA generation disabled and skips the memory-heavy client typecheck. - Updated the in-app updater to build shared, server, and client sequentially on Android instead of running server/client builds in parallel. - Set pnpm workspace install behavior so release installs do not abort on trust downgrade metadata or non-interactive node_modules repair prompts. - Added launcher/installer pnpm flags and a workspace dependency sanity check so partial installs are repaired before builds. - Added Android and dependency-install troubleshooting docs. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm install --frozen-lockfile` - `node scripts/check-workspace-install.mjs` - `pnpm check` - `pnpm --filter @marinara-engine/shared build` - `MARINARA_LOW_MEMORY_BUILD=1 pnpm --filter @marinara-engine/server build` - `MARINARA_LOW_MEMORY_BUILD=1 pnpm --filter @marinara-engine/client build` - `pnpm --filter @marinara-engine/server build` - `pnpm --filter @marinara-engine/client build` - `pnpm --filter @marinara-engine/server lint` - `pnpm --filter @marinara-engine/client lint` - `pnpm --filter @marinara-engine/server test` - `pnpm version:check` - `node scripts/check-windows-installer-layout.mjs` - `git diff --check` ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Not applicable; this is update/build plumbing and docs. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:19:51 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5822
No description provided.