denoland/deno · warning
Deno.autoUpdate: no version in deno.json, skipping
Error message
Deno.autoUpdate: no version in deno.json, skipping
What it means
Deno.autoUpdate() is injected into desktop apps (cli/rt/desktop.rs) to check an HTTPS release feed for updates. The current app version is baked in at build time from the root deno.json's `version` field; when that field is absent, _version is null and the function logs this console.warn and returns without checking for updates. It is a skip notice, not a crash — auto-update is silently disabled.
Source
Thrown at cli/rt/desktop.rs:1081
: (urlOrOpts ?? {{}});
const {{
url = _releaseBaseUrl,
interval,
onUpdateReady,
onRollback,
publicKey,
}} = opts;
if (_rolledBack && typeof onRollback === "function") {{
queueMicrotask(() => {{
try {{ onRollback(ROLLBACK_REASON); }} catch (e) {{
console.error("Deno.autoUpdate onRollback threw:", e);
}}
}});
}}
if (!_version) {{
console.warn("Deno.autoUpdate: no version in deno.json, skipping");
return;
}}
if (typeof url !== "string" || url.length === 0) {{
console.warn("Deno.autoUpdate: missing 'url' option, skipping");
return;
}}
if (!isHttpsUrl(url)) {{
console.error(
"Deno.autoUpdate: refusing non-https url (got %s); ignoring.", url,
);
return;
}}
const base = url.replace(/\/$/, "");
const te = new TextEncoder();
const check = async () => {{
try {{View on GitHub (pinned to f7822238ca)
Solutions
- Add a semver `"version"` field to the root deno.json (e.g. "version": "1.0.0") and rebuild the desktop binary — the value is baked in at compile time.
- Bump that version in CI/release so the updater can detect newer releases.
- Verify after rebuild by launching the app: the warning should no longer appear when Deno.autoUpdate runs.
- Pass an explicit release url and publicKey so that, once versioned, the update flow is fully configured.
Example fix
// before: deno.json
{
"name": "my-app",
"tasks": { "dev": "deno desktop ." }
}
// after
{
"name": "my-app",
"version": "1.0.0",
"tasks": { "dev": "deno desktop ." }
} Defensive patterns
Strategy: validation
Validate before calling
// pre-build check (CI): fail if a desktop build has no version
const cfg = JSON.parse(Deno.readTextFileSync("deno.json"));
if (!cfg.version) {
throw new Error("deno.json is missing \"version\"; auto-update will be skipped");
} Prevention
- Set "version" in the root deno.json before the first `deno compile --desktop` build — it is baked in at compile time.
- Bump the version as part of the release pipeline so auto-update can detect new releases.
- Smoke-test a built binary and assert the "no version in deno.json" warning does not appear.
When it happens
Trigger: Building a desktop app (`deno compile --desktop`) from a project whose root deno.json has no `"version"` field, then running the binary — Deno.autoUpdate() (or its timer) warns immediately and never polls for updates.
Common situations: Prototypes/early apps whose deno.json only has name/tasks/imports; adding autoUpdate({ url, publicKey }) after the fact without adding a version; monorepos where the root deno.json is a workspace manifest without a version and the desktop package config lives elsewhere.
Related errors
- Missing 'version' field in '{}'. Add a version like: {
- {} is missing 'version' field
- Deno.autoUpdate: missing 'url' option, skipping
- Deno.autoUpdate: latest.json is not valid JSON
- Deno.autoUpdate: no patch available for
AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20).
Data as JSON: /api/errors/3a4b6abb9758a298.
Report an issue: GitHub.