How to Set Up Node.js and pnpm with Mise

A short, copy-paste recipe for using mise to pin a Node.js version and enable pnpm via Corepack. Includes a minimal mise.toml snippet and a list of quick verification steps.

I use mise to pin the developer toolchain for a repository so onboarding is simple and reproducible. This recipe shows the minimal mise.toml entries I keep in most of my projects when I need Node and pnpm.

Why use mise for Node

Minimal mise.toml

Here is a tiny, practical example. It is intentionally simple and matches the setup I use on this site.

TOML
[tools]
node = "24"

[hooks]
postinstall = "corepack enable pnpm && corepack use pnpm@latest-10"

[settings]
experimental = true

[env]
_.path = ["./node_modules/.bin"]

Notes on the snippet

Setup steps

  1. Add the mise.toml above to your repository root.
  2. Run mise install. On a new machine this will install the pinned Node version and make node available.
  3. Install dependencies with pnpm. Because of the postinstall hook, Corepack will be configured and pnpm will be available.
Shell
mise install
pnpm install

Verify

Shell
which node
node --version
pnpm --version

If the versions match what you expect, the setup worked.

Tips

Other recipes in Mise