denoland/deno · warning

JSR package version info not found: {}

Error message

JSR package version info not found: {}

What it means

Companion to the package-level miss in cli/lsp/jsr.rs:439: while building export completions for a specific package@version, resolver.package_version_info(nv) returned None and the LSP raises "JSR package version info not found: {nv}". The version must already be published and its metadata fetchable; a yanked/unpublished/mistyped version or a failed fetch yields None.

Source

Thrown at cli/lsp/jsr.rs:439

    let versions = Arc::new(versions);
    self
      .versions_cache
      .insert(name.to_string(), versions.clone());
    Ok(versions)
  }

  async fn exports(
    &self,
    nv: &PackageNv,
  ) -> Result<Arc<Vec<String>>, AnyError> {
    if let Some(exports) = self.exports_cache.get(nv) {
      return Ok(exports.clone());
    }
    let info = self
      .resolver
      .package_version_info(nv)
      .await
      .ok_or_else(|| anyhow!("JSR package version info not found: {}", nv))?;
    let mut exports = info
      .exports()
      .map(|(n, _)| n.to_string())
      .collect::<Vec<_>>();
    exports.sort();
    let exports = Arc::new(exports);
    self.exports_cache.insert(nv.clone(), exports.clone());
    Ok(exports)
  }
}

fn parse_jsr_search_response(source: &str) -> Result<Vec<String>, AnyError> {
  #[derive(Debug, Deserialize)]
  #[serde(rename_all = "camelCase")]
  struct Item {
    scope: String,
    name: String,
    version_count: usize,

View on GitHub (pinned to 89f33cbef2)

Solutions

  1. List the real versions: `deno info jsr:@scope/pkg` or check the jsr.io versions tab, then pin an existing one
  2. Use the latest tag / no version and let the lockfile resolve: jsr:@scope/pkg or jsr:@scope/pkg@latest
  3. If the version should exist, check network access to jsr.io and retry — the LSP caches the negative result only per session
  4. For yanked versions, upgrade dependents via `deno update` to a published version

Example fix

// before
import { x } from "jsr:@std/collections@9.9.9";

// after
import { x } from "jsr:@std/collections@1.0.6"; // a published version
Defensive patterns

Strategy: retry

Validate before calling

const versions = await fetch(`https://jsr.io/@scope/pkg/meta.json`).then(r => r.json());
if (!versions.versions["0.9.9"]) throw new Error("version not published");

Try / catch

// user-side: re-run deno info after network recovery; the negative cache is per-LSP-session
try {
  await import("jsr:@scope/pkg@0.9.9");
} catch (e) {
  if (/jsr/i.test(String(e))) {
    // re-check published versions and re-resolve
  }
}

Prevention

When it happens

Trigger: Importing jsr:@scope/pkg@0.9.9 when only 1.x is published; completions for a version string typed by hand that doesn't exist; offline/proxied environments where the per-version metadata request fails; versions yanked after publication.

Common situations: Copy-pasted imports with stale version pins from old READMEs; a teammate's lockfile referencing a since-yanked version; editor completions for subpath exports not appearing for one specific version.

Related errors


AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16). Data as JSON: /api/errors/6f97711271fbfbe9. Report an issue: GitHub.