denoland/deno · error
{}
Error message
{} What it means
JSR accepts a publish as a server-side task; `deno publish` polls the task's status and surfaces the registry's own error message when that task reached the error state (the calling layer adds the 'Failed to publish @scope/pkg@version' prefix, so no doubling here). The text comes straight from JSR — typical examples are 'version already exists', scope authorization failures, or rejected package metadata.
Source
Thrown at cli/tools/publish/mod.rs:1190
format!(
"Failed to get publishing status for @{}/{} at {}",
package.scope, package.package, package.version
)
})?;
task = registry::parse_response::<registry::PublishingTask>(resp)
.await
.with_context(|| {
format!(
"Failed to get publishing status for @{}/{} at {}",
package.scope, package.package, package.version
)
})?;
}
if let Some(error) = task.error {
// The caller adds the "Failed to publish <name>@<version>" context, so only
// surface the registry's error message here to avoid a doubled prefix.
bail!("{}", error.message);
}
let enable_provenance = std::env::var("DISABLE_JSR_PROVENANCE").is_err()
&& (auth::is_gha() && auth::gha_oidc_token().is_some() && provenance);
// Enable provenance by default on Github actions with OIDC token
if enable_provenance {
// Get the version manifest from the registry
let meta_url = jsr_url().join(&format!(
"@{}/{}/{}_meta.json",
package.scope, package.package, package.version
))?;
let resp = http_client
.get(meta_url.clone())?
.send()
.await
.with_context(|| {View on GitHub (pinned to f7822238ca)
Solutions
- Read the surfaced message: 'already exists' → bump `version` in deno.json; authorization errors → check scope membership on jsr.io for the account tied to the token.
- Fix per the message and re-run — publish is idempotent for versions that already succeeded.
- If the message suggests an outage, retry later and check https://status.jsr.io.
Defensive patterns
Strategy: try-catch
Try / catch
#!/usr/bin/env bash
out="$(deno publish 2>&1)" || {
rc=$?
if printf '%s' "$out" | grep -qi 'already exists'; then
echo "version already on JSR — bump version and re-run" >&2; exit 10
elif printf '%s' "$out" | grep -qi 'unauthorized\|not a member\|forbidden'; then
echo "scope permission problem — check jsr.io scope membership for this account" >&2; exit 11
fi
printf '%s\n' "$out" >&2; exit $rc
} Prevention
- Make version bumps mandatory in the release script so re-publishing an existing version cannot happen.
- Serialize publish jobs (concurrency groups in Actions, a release lock) to prevent two runs racing on the same version.
- Bump version, then publish, in one atomic pipeline step; keep the registry's raw message in CI logs for triage.
When it happens
Trigger: The registry publish task fails server-side: re-publishing an existing version (race between two runs), the authenticated user lacking permission for the scope, or content JSR rejects (name/version rules, invalid files).
Common situations: Two CI jobs racing to publish the same version; the token's account was removed from the org/scope; forgetting the version bump after a failed-then-fixed release; JSR incidents.
Related errors
- Either `node` or `range` must be provided when reporting an
- Invalid range. Start value is bigger than end value: [${star
- No means to authenticate. Pass a token to `--token`, or enab
- Found {} problem{}
- Cannot represent compiler option '{name}' as a generated JSX
AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20).
Data as JSON: /api/errors/adf59df42048e781.
Report an issue: GitHub.