[PR #1398] [CLOSED] fix(termux): add native dependencies and error handling to start-termux.sh #5065

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1398
Author: @vanta-jack
Created: 5/27/2026
Status: ❌ Closed

Base: staging ← Head: fix/termux-sharp-build


📝 Commits (7)

  • 19411f3 Fix mobile composer text input collapse (#1136)
  • 77a30fa Fix tracker aliases, avatars, HUD temps, and changelog (#1137)
  • e85da38 Reduce chat startup and focus refetch lag
  • 10b6330 Revert "Reduce chat startup and focus refetch lag"
  • 1ab4c3f Register pre-alpha workflow on default branch
  • 1f7b25a Merge pull request #1382 from munimunigamer/ci/register-prealpha-workflow
  • a4190a7 fix(termux): add native dependencies and error handling to start-termux.sh

📊 Changes

12 files changed (+529 additions, -69 deletions)

View changed files

➕ .github/workflows/prealpha-platform-builds.yml (+335 -0)
📝 CHANGELOG.md (+16 -0)
📝 packages/client/src/components/chat/ConversationInput.tsx (+5 -5)
📝 packages/client/src/components/chat/RoleplayHUD.tsx (+19 -37)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+1 -1)
📝 packages/client/src/components/panels/settings/TrackerCardColorSettings.tsx (+17 -11)
📝 packages/client/src/features/tracker-panel/hooks/use-tracker-sprite-lookup.ts (+11 -6)
📝 packages/client/src/features/tracker-panel/lib/tracker-metadata.ts (+31 -0)
📝 packages/client/src/lib/character-display.ts (+40 -0)
📝 packages/server/src/routes/generate.routes.ts (+8 -4)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+40 -4)
📝 start-termux.sh (+6 -1)

📄 Description

Linked issue

Closes #1397

Why this change

Termux users often encounter a "tsc not found" error during the first run. This is caused by a silent failure of pnpm install when it attempts to build the sharp native module without the required system-level dependencies (libvips, pkg-config). Because pnpm stops on the first failure, the linking phase never completes, leaving the node_modules/.bin folder empty.

What changed

  • Added libvips and pkg-config to the automated pkg install loop in start-termux.sh.
  • Exported SHARP_FORCE_GLOBAL_LIBVIPS=1 in the Termux startup flow to ensure sharp correctly links against the system libvips.
  • Added explicit error checking to the pnpm install command in start-termux.sh to prevent the script from proceeding to the build phase if installation fails.

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

  1. Removed node_modules and cleared libvips from the environment.
  2. Ran the modified start-termux.sh.
  3. Verified that libvips and pkg-config were automatically installed via pkg.
  4. Verified that pnpm install completed successfully, including the sharp build.
  5. Verified that tsc was correctly linked and the build process completed successfully.
  6. Verified that the server started and was accessible via the browser.

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)

N/A (Shell script changes)


🔄 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/1398 **Author:** [@vanta-jack](https://github.com/vanta-jack) **Created:** 5/27/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `fix/termux-sharp-build` --- ### 📝 Commits (7) - [`19411f3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/19411f3675ea22a60b5803feecfd0e8b17a6ab06) Fix mobile composer text input collapse (#1136) - [`77a30fa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/77a30fa4ee43b368f4ba4709b0161705e7c05881) Fix tracker aliases, avatars, HUD temps, and changelog (#1137) - [`e85da38`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e85da38d6f3a5abaceffc80dd1d661281bf4b497) Reduce chat startup and focus refetch lag - [`10b6330`](https://github.com/Pasta-Devs/Marinara-Engine/commit/10b633089c8840d9d057ff99351c0091db8d78eb) Revert "Reduce chat startup and focus refetch lag" - [`1ab4c3f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ab4c3f367e98478cb1aded6d0ce7018145500bc) Register pre-alpha workflow on default branch - [`1f7b25a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1f7b25aae5560c35911bdaae0d436bd0e17346f8) Merge pull request #1382 from munimunigamer/ci/register-prealpha-workflow - [`a4190a7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a4190a7380db2c098c57617e8c4e6e2c546287de) fix(termux): add native dependencies and error handling to start-termux.sh ### 📊 Changes **12 files changed** (+529 additions, -69 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/prealpha-platform-builds.yml` (+335 -0) 📝 `CHANGELOG.md` (+16 -0) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+5 -5) 📝 `packages/client/src/components/chat/RoleplayHUD.tsx` (+19 -37) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+1 -1) 📝 `packages/client/src/components/panels/settings/TrackerCardColorSettings.tsx` (+17 -11) 📝 `packages/client/src/features/tracker-panel/hooks/use-tracker-sprite-lookup.ts` (+11 -6) 📝 `packages/client/src/features/tracker-panel/lib/tracker-metadata.ts` (+31 -0) 📝 `packages/client/src/lib/character-display.ts` (+40 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+8 -4) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+40 -4) 📝 `start-termux.sh` (+6 -1) </details> ### 📄 Description ## Linked issue Closes #1397 ## Why this change Termux users often encounter a "tsc not found" error during the first run. This is caused by a silent failure of `pnpm install` when it attempts to build the `sharp` native module without the required system-level dependencies (`libvips`, `pkg-config`). Because `pnpm` stops on the first failure, the linking phase never completes, leaving the `node_modules/.bin` folder empty. ## What changed - Added `libvips` and `pkg-config` to the automated `pkg install` loop in `start-termux.sh`. - Exported `SHARP_FORCE_GLOBAL_LIBVIPS=1` in the Termux startup flow to ensure `sharp` correctly links against the system `libvips`. - Added explicit error checking to the `pnpm install` command in `start-termux.sh` to prevent the script from proceeding to the build phase if installation fails. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes 1. Removed `node_modules` and cleared `libvips` from the environment. 2. Ran the modified `start-termux.sh`. 3. Verified that `libvips` and `pkg-config` were automatically installed via `pkg`. 4. Verified that `pnpm install` completed successfully, including the `sharp` build. 5. Verified that `tsc` was correctly linked and the build process completed successfully. 6. Verified that the server started and was accessible via the browser. ## Docs and release impact - [x] 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) N/A (Shell script changes) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:54 +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#5065
No description provided.