fix(mise): skip vercel install on Windows (#26420)

## Problem

`test-go-pg (windows-2022)` has been red on `main` since the Vercel CLI
was added to `mise.toml`. Every PR that runs Windows CI (including
#26389) fails at `Restore Go cache` -> setup-mise -> `mise install`, and
the `:x: CI Failure` Slack notifications have been firing ~hourly
because of it.

The Vercel CLI lives in the top-level `[tools]` block, so mise tries to
install it on every runner. It is installed via the `npm:vercel`
backend, which runs:

```
C:\Windows\system32\cmd.exe /d /s /c node install.js
```

as an npm post-install script. mise installs node into its own shim dir;
`node` is not on cmd.exe's PATH at the moment npm spawns the
post-install script, so it fails with:

```
npm error command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm error 'node' is not recognized as an internal or external command,
npm error operable program or batch file.
mise ERROR Failed to install npm:vercel@54.14.0: npm.cmd exited with non-zero status: exit code 1
```

The whole setup-mise step aborts, so the rest of the job is skipped.
Tracked in coder/internal#1596.

## Fix

The Vercel CLI is only used to deploy / preview from dogfood workspaces
(Linux). Restrict it to linux/macos via the documented
[`os`](https://mise.jdx.dev/dev-tools/#os-specific-tools) filter:

```toml
vercel = { version = "54.14.0", os = ["linux", "macos"] }
```

On Windows mise will now skip the install entirely. On Linux/macOS
behavior is unchanged, the binary still resolves through the same
`npm:vercel` backend.

## Lockfile

`os` is an install-time filter and has no representation in `mise.lock`.
`mise lock` against the pinned `min_version = "2026.5.12"` produces no
diff, so the lockfile is intentionally left as-is.

## Verification

- `mise trust && mise ls` on Linux still resolves `vercel 54.14.0` from
`mise.toml`.
- `mise lock` against pinned v2026.5.12 is a no-op on `mise.lock`.
- Windows runners will report `(skipped)` for `vercel` and continue past
setup-mise.

Fixes coder/internal#1596.

Created on behalf of @kylecarbs.

Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
This commit is contained in:
blinkagent[bot]
2026-06-16 17:23:22 +00:00
committed by GitHub
co-authored by blink-so[bot]
parent 0c1c4af40a
commit 9e7eedc9e9
+6 -1
View File
@@ -72,7 +72,12 @@ lazygit = "0.61.1"
# module's `command -v devcontainer` short-circuit fires
"npm:@devcontainers/cli" = "0.87.0"
# Vercel CLI for deploying/previewing projects from dogfood workspaces.
vercel = "54.14.0"
# Restricted to Linux/macOS because mise installs this through `npm:vercel`,
# which spawns `node install.js` from cmd.exe on Windows. mise's `node` lives
# only in the shim dir at install time, so `node` is not on PATH and the
# install fails with `'node' is not recognized` (coder/internal#1596). The
# CLI is only needed in dogfood workspaces, which are Linux.
vercel = { version = "54.14.0", os = ["linux", "macos"] }
# weekly-docs uses this pinned Puppeteer browser installer to install Chrome for
# action-linkspector without resolving mutable npm metadata at runtime.
"npm:@puppeteer/browsers" = "2.13.0"