mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #767] [MERGED] fix(deps): move sharp back to optionalDependencies (Termux install regression) #4766
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4766
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/767
Author: @Romuromylus
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Romuromylus
Base:
main← Head:fix/sharp-revert-to-optional📝 Commits (1)
1e6a9e9fix(deps): move sharp back to optionalDependencies📊 Changes
2 files changed (+5 additions, -5 deletions)
View changed files
📝
packages/server/package.json(+2 -2)📝
pnpm-lock.yaml(+3 -3)📄 Description
Linked issue
Closes #746
Refs #735, #758, #737
Why this change
PR #735 moved `sharp` from `optionalDependencies` to `dependencies` as a "semantic correctness" improvement. That turned out to break Termux/Android installs — and this regression was the trigger for the subsequent Termux fixes #737 (wasm32 `.npmrc` injection) and #758 (lazy-load sharp in `game-assets.routes.ts`). Those two helped but did not fully resolve the install-time failure path, because they only mitigate the wasm32-resolved and runtime-load paths respectively.
Timing evidence
Why `dependencies` broke Termux
When sharp sits in `dependencies`, pnpm must install it unconditionally. On Android `arm64`:
```
sharp: Attempting to build from source via node-gyp
sharp: Please add node-addon-api to your dependencies
ELIFECYCLE Command failed with exit code 1.
```
Sample log (TuGunJr, posting after #758 was merged, on commit `
b1204f1`):```
~/Marinara-Engine $ ./start-termux.sh
...
[WARN] Build commit mismatch: source
b1204f1d80but dist hasc408aa7350[..] Forcing rebuild to apply update...
...
node_modules/.pnpm/sharp@0.34.5/node_modules/sharp: Running install script, failed in 886ms
Note `dist has
c408aa7350` — that's the merge commit of #735, confirming this is the post-#735 fallout.What changed
The `Dockerfile.lite` changes from #735 (drop `--no-optional`, add `pnpm rebuild sharp`, explicit `rm -rf onnxruntime-{node,web}`) stay in place — they fixed the original Lite startup crash from issue #734 independently of where sharp sits in `package.json`. Because Dockerfile.lite no longer passes `--no-optional`, sharp is installed in the Lite image either way.
Validation
Manual verification notes
Still needs human verification:
Docs and release impact
UI evidence (if applicable)
N/A — `package.json` manifest revert + lockfile regenerate.
Summary by CodeRabbit
sharppackage is now optional, allowing users to install only the components they need.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.