Skip to content

Node.js versions

Most PHP projects also need a JavaScript toolchain — for Vite, asset builds, or a front-end dev server. Butler manages Node.js versions for you through fnm, so you don’t need a separate Node manager.

Node support comes from the fnm component. Install it once, then install the Node versions you want:

Terminal window
butler install fnm
butler fnm install 22 # install the latest Node 22.x
butler fnm install 20

Set a default version:

Terminal window
butler fnm default 22

The Node section of the menu bar app shows your installed versions with a picker to install more or change the default — the same actions without the terminal.

Butler exposes the active Node toolchain through its own subcommands, so they use the version Butler manages regardless of what’s otherwise on your PATH:

Terminal window
butler node -v
butler npm install
butler npx vite build

Installing pnpm through npm ties it to one Node version, so every new Node you install starts without it. Butler ships pnpm as its own component instead:

Terminal window
butler install pnpm
pnpm install

One pnpm, on your PATH, independent of which Node is active — switching Node versions doesn’t take it away, and it updates itself (pnpm self-update) rather than waiting on Butler to publish a new build.

If you’d rather call node, npm, php and composer directly (without the butler prefix), install Butler’s shell integration:

Terminal window
butler shell install

This puts Butler’s php, Node, Composer and pnpm on your PATH, with per-directory version switching — along with Python and Ruby if you’ve installed those. Check what’s resolving with:

Terminal window
butler doctor # every shim, what it resolves to, and anything shadowing it

These are real files on PATH, not shell functions, so an editor, a build script or a git hook resolves the same versions your terminal does — none of them source your shell profile.