windmill-labs/windmill · info
Cannot fetch latest CLI version on npmjs to check if up-to-d
Error message
Cannot fetch latest CLI version on npmjs to check if up-to-date: ${e} What it means
checkVersionSafe compares the installed CLI version against the latest wmill version on npmjs. When the npmjs fetch throws (network failure, DNS, proxy, rate limit), the catch prints this console.warn with the underlying error and the command continues normally — only the up-to-date/outdated notice is lost.
Source
Thrown at cli/src/main.ts:238
.command("datatable", datatable)
.command("pipeline", pipeline)
.command("ducklake", ducklake)
.command("object-storage", objectStorage)
.command("version --version", "Show version information")
.action(async (opts: any) => {
console.log("CLI version: " + VERSION);
try {
const provider = new NpmProvider({ package: "windmill-cli" });
const versions = await provider.getVersions("windmill-cli");
if (versions.latest !== VERSION) {
console.log(
`CLI is outdated. Latest version ${versions.latest} is available. Run \`wmill upgrade\` to update.`
);
} else {
console.log("CLI is up to date");
}
} catch (e) {
console.warn(
`Cannot fetch latest CLI version on npmjs to check if up-to-date: ${e}`
);
}
const workspace = await getActiveWorkspace(opts as GlobalOptions);
if (workspace) {
try {
const backendVersion = await fetchVersion(workspace.remote);
console.log("Backend Version: " + backendVersion);
} catch (e) {
console.warn(
`Cannot fetch backend version from ${workspace.remote} (workspace: ${workspace.name}): ${e}`
);
}
} else {
console.warn(
"Cannot fetch backend version: no active workspace selected, choose one to pick a remote to fetch version of"
);
}View on GitHub (pinned to e474e8803c)
Solutions
- Restore network access to registry.npmjs.org or configure HTTPS_PROXY/HTTP_PROXY.
- Skip the check intentionally via the CLI's no-version-check env option (e.g. WMILL/no version check env var) in offline environments.
- Check npm status (npmjs status page) if the error mentions HTTP 5xx.
- Ignore the warning; it does not affect command execution.
Example fix
// before wmill sync push // Cannot fetch latest CLI version on npmjs to check if up-to-date: TypeError: fetch failed // after export HTTPS_PROXY=http://proxy.corp.internal:3128 wmill sync push
Defensive patterns
Strategy: try-catch
Validate before calling
try {
const res = await fetch("https://registry.npmjs.org/wmill/latest", { signal: AbortSignal.timeout(3000) });
console.log("npm reachable:", res.ok);
} catch (e) {
console.log("npm unreachable, up-to-date check will be skipped:", e);
} Try / catch
try {
await $`wmill sync push`;
} catch (e) {
if (!String(e).includes("Cannot fetch latest CLI version")) throw e;
// ignore version-check noise; the sync itself succeeded
} Prevention
- Ensure egress to registry.npmjs.org or set HTTPS_PROXY/HTTP_PROXY
- Disable the version check explicitly in offline environments rather than letting it fail
- Pin wmill versions in CI so the up-to-date notice is irrelevant
- Watch for 429/5xx from npm during outages
When it happens
Trigger: Any command that triggers the npm version check (e.g. `wmill sync`, most commands) when the request to registry.npmjs.org fails: no internet, blocked egress, proxy misconfig, npm outage, or invalid WINDMILL-version-check environment overrides.
Common situations: CI runners without npmjs access; offline development; corporate firewalls; npmjs returning 429/5xx; IPv6 breakage on the host.
Related errors
- Skipping latest-version check: ${e instanceof Error ? e.mess
- Dependency generation failed: ${queueResponse.status} ${queu
- Failed to poll dependencies job ${jobId}: ${e?.message ?? e}
- No response body for SSE stream
- Failed to poll flow dependencies job ${jobId}: ${e?.message
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/6fff46e7fa1c0534.
Report an issue: GitHub.