v1.0.11 - Fix Sharp Module Loading on ARM64
馃敡 Bug Fixes
Sharp Module Loading (ARM64)
- Fixed runtime module resolution for Sharp image processing library
- Created proper pnpm symlink structure for @img/sharp-libvips-linux-arm64
- Removed x64 libvips packages that were incorrectly included
Root Cause
Sharp's ARM64 binary loaded successfully, but when it tried to dynamically load libvips, Node's module resolution failed because the required node_modules/@img/ symlinks were missing.
Technical Details
- Added top-level symlinks:
node_modules/@img/sharp-linux-arm64andnode_modules/@img/sharp-libvips-linux-arm64 - These symlinks point to the actual packages in
.pnpm/store - Now libvips-cpp.so.8.17.2 can be found via Node's module resolution
- Removed non-ARM64 libvips packages during build
Verification
After installing v1.0.11 on Raspberry Pi:
cd /opt/escapeplan/api
node -e "console.log(require('sharp'))"
# Should output: [Function (anonymous)] { ... }Full debugging session: See SESSION_2025-10-09_SHARP_MODULE_DEBUGGING.md