fix-brew-node-dylib-mismatch
Skill1 starsChanged 5 months agoMITView on GitHub
Fix missing .dylib libraries when brew upgrades break Node.js browser tooling — create symlinks from old version numbers to new.
- Installs packages
In this repository13 other files it gives its agents.
- github-demo-recordingSkill
- github-exposure-standardSkill
- github-project-discovery-hybridSkill
- install-tool-with-verificationSkill
- ios-app-build-automationSkill
- macos-backup-overwrite-onlySkill
- macos-deploy-python-tool-from-githubSkill
- macos-ram-swap-analysisSkill
- open-notebook-docker-ollama-setupSkill
- reddit-post-launch-workflowSkill
- self-regulation-brake-systemSkill
- social-media-account-registrationSkill
- webhook-subscriptionsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 85
When brew reinstall or brew upgrade runs for a library that node@22 depends on:
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🔧 Fix Brew Node .dylib Mismatch
When to Use
Hermes Agent's browser tools (browser_navigate, browser_console, etc.) fail with errors like:
dyld[NNN]: Library not loaded: /opt/homebrew/opt/simdjson/lib/libsimdjson.29.dylib
Referenced from: .../node@22/22.22.0/bin/node
Reason: tried: .../libsimdjson.29.dylib' (no such file)This happens when brew upgrades a library (e.g. simdjson, simdutf, icu4c, libuv) to a newer major version, but the old node@22 binary still expects the old version number. The symlink created during the brew install points to the old Cellar directory that was removed during cleanup.
Symptoms
- All
browser_navigate/browser_snapshot/browser_consolecalls fail with the samedylderror - Running
node --versionreturns a different version than the one giving errors (e.g. node v26 works but node@22 v22.22.0 is broken) - The error mentions a specific
.dylibversion number (e.g..29,.31)
Step-by-Step Fix
1. Identify the Missing Library
dyld[NNN]: Library not loaded: /opt/homebrew/opt/simdjson/lib/libsimdjson.29.dylibThe key info is:
- Library name:
simdjson(orsimdutf,icu4c, etc.) - Expected version:
.29(fromlibsimdjson.29.dylib)
2. Check Current Versions
# See what versions exist now
ls /opt/homebrew/opt/simdjson/lib/libsimdjson* 2>/dev/null
ls /opt/homebrew/Cellar/simdjson/*/lib/libsimdjson* 2>/dev/null
# Check what node@22 actually links against
otool -L /opt/homebrew/Cellar/node@22/22.22.0/bin/node | grep -E "(simdjson|simdutf|icu4c)"3. Create Compatibility Symlink in TWO Locations
Both locations are needed because different tools look in different paths:
# Path 1: /opt/homebrew/opt/ symlink (used by the launcher)
ln -sf /opt/homebrew/opt/simdjson/lib/libsimdjson.33.dylib /opt/homebrew/opt/simdjson/lib/libsimdjson.29.dylib
# Path 2: /opt/homebrew/Cellar/ symlink (used by the direct binary)
ln -sf /opt/homebrew/Cellar/simdjson/4.6.4/lib/libsimdjson.33.dylib /opt/homebrew/Cellar/simdjson/4.6.4/lib/libsimdjson.29.dylibThe pattern is:
ln -sf <CURRENT_LIB> <EXPECTED_LIB_NAME>Where <CURRENT_LIB> is the latest version (e.g. libsimdjson.33.dylib) and <EXPECTED_LIB_NAME> is the version the old node expects (e.g. libsimdjson.29.dylib).
4. Verify
# The browser should now work
browser_navigate(url="https://example.com")Known Libraries That Have Caused This
| Library | Old Version | New Version | Check command |
| simdjson | .29 | .33 | ls /opt/homebrew/opt/simdjson/lib/libsimdjson* |
| simdutf | .31 | .34 | ls /opt/homebrew/opt/simdutf/lib/libsimdutf* |
Root Cause
When brew reinstall or brew upgrade runs for a library that node@22 depends on:
- The old version's
.dylibfiles are removed from the Cellar - The new version has a different
.dylibnumber (e.g..29→.33) node@22was compiled against the old number and refuses to load the new one- Since
node@22is pinned at v22.22.0 (not upgraded to v26), it never gets relinked
Pitfalls
- Do NOT use
sudo— The symlinks can be created in/opt/homebrew/opt/and/opt/homebrew/Cellar/without sudo - Check both locations — Creating only the
optsymlink may not fix it if the binary reads fromCellardirectly - Multiple libraries may be broken at once — After fixing
simdjson,simdutfmay also fail. Checkotool -Lfor all deps - This is a temporary fix — The real fix is to get the Hermes agent to use the system node v26 instead of the pinned node@22
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

