Pinning Node.js LTS on macOS with Homebrew
If you installed Node.js via Homebrew (brew install node), you’re tracking the latest current release — which can include odd-numbered development versions (e.g. 23.x, 25.x). These aren’t LTS and may have breaking changes or instability.
GSD requires Node.js v22 or later and works best on an LTS (even-numbered) release. This guide shows how to pin Node 24 LTS using Homebrew.
Check your current version
Section titled “Check your current version”node --versionIf this shows an odd number (e.g. v23.x, v25.x), you’re on a development release.
Install Node 24 LTS
Section titled “Install Node 24 LTS”Homebrew provides versioned formulas for LTS releases:
# Unlink the current (possibly non-LTS) versionbrew unlink node
# Install Node 24 LTSbrew install node@24
# Link it as the defaultbrew link --overwrite node@24Verify:
node --version# Should show v24.x.xWhy pin to LTS?
Section titled “Why pin to LTS?”- Stability — LTS releases receive bug fixes and security patches for 30 months
- Compatibility — npm packages (including GSD) test against LTS versions
- No surprises —
brew upgradewon’t jump you to an unstable development release
Prevent accidental upgrades
Section titled “Prevent accidental upgrades”By default, brew upgrade will upgrade all packages, which could move you off the pinned version. Pin the formula:
brew pin node@24To unpin later:
brew unpin node@24Switching between versions
Section titled “Switching between versions”If you need multiple Node versions (e.g. 22 and 24), consider using a version manager instead:
- nvm —
nvm install 24 && nvm use 24 - fnm —
fnm install 24 && fnm use 24(faster, Rust-based) - mise —
mise use node@24(polyglot version manager)
These let you set per-project Node versions via .node-version or .nvmrc files.
Verify GSD works
Section titled “Verify GSD works”After pinning:
node --version # v24.x.xnpm install -g gsd-pigsd --version