Vercel doesn't ship Nub in its build image, but it lets you replace the install command — which is all it takes.

Point the install command at Nub

Add both commands to vercel.json. The installer fetches a static binary, then Nub installs the dependencies and runs the build:

vercel.json
{
  "installCommand": "curl -fsSL https://nubjs.com/install.sh | bash && export PATH=$HOME/.nub/bin:$PATH && nub install",
  "buildCommand": "export PATH=$HOME/.nub/bin:$PATH && nub run build"
}

Export PATH — don't call the binary by path

The installer writes to $HOME/.nub/bin, and calling $HOME/.nub/bin/nub directly looks equivalent but leaves Nub off PATH for everything it then starts. A script like "build": "nub run i18n:compile && nubx vite build" fails with nub: command not found. Because the install and build commands run as separate shells, the export belongs in both.

Deploy

Connect the repository from the Vercel dashboard, or push a deployment from the CLI:

nubx vercel deploy

Verify Nub ran the build

The build log names the version it installed and the Node it picked up:

Installed nub v0.6.0 (with nubx) to /vercel/.nub/bin/nub
nub 0.6.0 · ✓ Already up to date (2 packages)
$ nub run build
» node v24.15.0 (from PATH)
Build Completed in /vercel/output [3s]

The Node line is the thing to check. Nub augments the Node the build machine already provisioned rather than downloading one, which is why adding it costs seconds.

The devDependency alternative

Overriding the install command isn't required. Adding the CLI as a devDependency also works and leaves vercel.json empty:

{
  "devDependencies": {
    "@nubjs/nub": "^0.6.0"
  },
  "scripts": {
    "build": "nubx vite build"
  }
}

Vercel's auto-detected install links nub and nubx onto node_modules/.bin, and your scripts resolve them. Reach for it when you'd rather pin the version in the manifest than in build settings; see Hosted builds for the full pattern.

Excluding development dependencies from the install drops the CLI along with them. Override the install command instead when a project builds without devDependencies.

Node version

Vercel selects the Node version and Nub adopts it, so pin it on Vercel's side:

  • Project Settings → Node.js Version
  • package.jsonengines.node

Nub reads engines.node too, so that spelling keeps both in agreement from one place.