denoland/deno · error

Export {} mismatch: expected {}, got {}

Error message

Export {} mismatch: expected {}, got {}

What it means

The registry version manifest records the package's export map, and verification compares every entry against the exports Deno sent. A differing subpath or target means JSR recorded different exports than the local package — a consistency/integrity failure in the provenance step (a missing export locally is the sibling 'Export {} not found in the package' error).

Source

Thrown at cli/tools/publish/mod.rs:1507

          path,
          entry.checksum,
          file.hash
        );
      }
    } else {
      bail!("File {} not found in the tarball", path);
    }
  }

  for (specifier, expected) in &manifest.exports {
    let actual = package.exports.get(specifier).ok_or_else(|| {
      deno_core::anyhow::anyhow!(
        "Export {} not found in the package",
        specifier
      )
    })?;
    if actual != expected {
      bail!(
        "Export {} mismatch: expected {}, got {}",
        specifier,
        expected,
        actual
      );
    }
  }

  Ok(())
}

static SUPPORTED_LICENSE_FILE_NAMES: [&str; 12] = [
  "LICENSE",
  "LICENSE.md",
  "LICENSE.txt",
  "LICENCE",
  "LICENCE.md",
  "LICENCE.txt",

View on GitHub (pinned to f7822238ca)

Solutions

  1. Re-run the publish job; already-uploaded versions skip and provenance re-verifies against a fresh manifest.
  2. Reproducible mismatches → report at https://github.com/denoland/deno/issues with the package and version.
  3. Urgent releases may pass `--no-provenance` to skip verification.
Defensive patterns

Strategy: try-catch

Try / catch

#!/usr/bin/env bash
out="$(deno publish 2>&1)" || {
  if printf '%s' "$out" | grep -q 'Export .* mismatch'; then
    echo "registry exports map disagrees with the uploaded package — retry once, then report upstream" >&2
    exit 73
  fi
  printf '%s\n' "$out" >&2; exit 1
}

Prevention

When it happens

Trigger: `manifest.exports[specifier] != package.exports[specifier]` during `verify_version_manifest` — the export map changed between upload and manifest generation, or the registry recorded stale/different values.

Common situations: Rare; seen during JSR incidents in provenance-enabled (GitHub Actions + OIDC) releases.

Related errors


AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20). Data as JSON: /api/errors/fc4c48e60db63f37. Report an issue: GitHub.