Cloudflare
Nub is preinstalled in the Cloudflare Workers Builds image, so package scripts that call it run with no setup step. Pages uses the devDependency pattern instead.
Cloudflare's Workers Builds image has preinstalled Nub since July 30, 2026. Package scripts that shell out to nub or nubx run unchanged:
{
"scripts": {
"build": "nub run i18n:compile && nubx vite build"
}
}There's no setup step to add and no devDependency to carry — the binary is on PATH the way pnpm and bun already are (tracking issue).
Workers Builds
Nub augments the Node the image provisions rather than bringing its own. Cloudflare's build image ships Node 22.23.2 and 24.18.0 and defaults to 24.18.0, so builds land on Nub's fast tier without configuration.
Both tools read the same version files, so a pin moves them together:
package.json→devEngines.runtime.node-version.nvmrcpackage.json→engines.node
Set one and the build Node matches the version Nub resolves at runtime.
Cloudflare's support for .tool-versions is limited, and an entry it cannot resolve fails the build. Prefer .node-version or .nvmrc on Workers Builds.
Pages
The change landed in the Workers Builds image, not the Pages one. A Pages build still reports:
sh: nub: not foundAdd @nubjs/nub as a devDependency there and call it from your scripts:
{
"devDependencies": {
"@nubjs/nub": "^0.6.0"
},
"scripts": {
"build": "nubx vite build"
}
}The package declares bin: { nub, nubx }, so the install Cloudflare runs links both onto node_modules/.bin and your scripts resolve them. See Hosted builds for the full pattern.
Version pinning
The image carries one Nub version and moves it on Cloudflare's own cadence. To hold a project to a specific version instead, add @nubjs/nub as a devDependency as above — the same pattern Pages needs, and it works identically on Workers Builds.
Docker
Official Nub Docker images, and how to add Nub to your own image. The images install Nub onto an official Node base, so Node is present and the runtime is augmented out of the box.
Vercel
Vercel ships no preinstalled Nub, but the install command is yours to replace — so one line puts the CLI on PATH for the rest of the build. The devDependency pattern works too.