Shipping a Self-Contained macOS App: How 24 Homebrew dylibs Broke My DeepSeek Harness Installer
TL;DR — I wrapped an npm-distributed AI agent workbench into a double-click macOS installer. It worked on my machine, then quit instantly with zero logs on a clean Mac. otool -L revealed 24 dynamic libraries linked by absolute Homebrew paths. Fixing it meant copying every dylib into the app bundle, rewriting paths to @loader_path , and re-signing. The installer got smaller (792 MB → 620 MB) while…
In a recent incident, a macOS installer for the DeepSeek Harness AI agent workbench encountered an issue due to 24 dynamic libraries linked by absolute Homebrew paths. This problem prevented the app from functioning properly on a clean Mac. The original distribution of DeepSeek Harness relied on npm installation, which required Node.js and was not user-friendly for those unfamiliar with terminal commands.
To address this, the author wrapped the app into a macOS installer that could be double-clicked to launch, creating a more accessible experience. However, when tested on a machine without Homebrew, the app would crash instantly without any logs. This was traced back to the 24 dynamic libraries linked by absolute Homebrew paths. Upon investigation, it was found that Homebrew's Node.js build includes these libraries under /opt/homebrew/opt/*/lib, leading to resolution failures when the app was run on a machine without Homebrew.
To resolve this, every dynamic library had to be copied into the app bundle, and the paths had to be rewritten to use @loader_path. This process also involved re-signing the Mach-O binaries, as modifying binaries within an app bundle requires re-signing. After implementing these changes, the installer size was reduced from 792 MB to 620 MB while adding three plugins.
The updated version includes a variety of plugins and agent presets, making it a more comprehensive and user-friendly experience. The DMG package now contains all necessary components, including Electron main process, bundled Node.js, dylibs, and seed profiles, ensuring a complete and self-contained installation.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.