EveryInc/compound-engineering-plugin · error · Error

package.json version ${root.version} does not match .claude-

Error message

package.json version ${root.version} does not match .claude-plugin/plugin.json version ${ce.version}

What it means

The release components loader reads versions from package.json and every plugin manifest and requires them to agree. This first consistency check throws when the root `package.json` version differs from `.claude-plugin/plugin.json`'s version, indicating release-owned versions have drifted out of sync (a known failure mode this guard prevents).

Source

Thrown at src/release/components.ts:197

    case "minor":
      return `${major}.${minor + 1}.0`
    case "patch":
      return `${major}.${minor}.${patch + 1}`
  }
}

export async function loadCurrentVersions(cwd = process.cwd()): Promise<VersionSources> {
  const root = await readJson<RootPackageJson>(`${cwd}/package.json`)
  const ce = await readJson<PluginManifest>(`${cwd}/.claude-plugin/plugin.json`)
  const antigravity = await readJson<PluginManifest>(`${cwd}/plugin.json`)
  const kimi = await readJson<PluginManifest>(`${cwd}/.kimi-plugin/plugin.json`)
  const grok = await readJson<PluginManifest>(`${cwd}/.grok-plugin/plugin.json`)
  const devin = await readJson<PluginManifest>(`${cwd}/.devin-plugin/plugin.json`)
  const marketplace = await readJson<MarketplaceManifest>(`${cwd}/.claude-plugin/marketplace.json`)
  const cursorMarketplace = await readJson<MarketplaceManifest>(`${cwd}/.cursor-plugin/marketplace.json`)

  if (root.version !== ce.version) {
    throw new Error(`package.json version ${root.version} does not match .claude-plugin/plugin.json version ${ce.version}`)
  }

  if (root.version !== antigravity.version) {
    throw new Error(`package.json version ${root.version} does not match plugin.json version ${antigravity.version}`)
  }

  if (root.version !== kimi.version) {
    throw new Error(`package.json version ${root.version} does not match .kimi-plugin/plugin.json version ${kimi.version}`)
  }

  if (root.version !== grok.version) {
    throw new Error(`package.json version ${root.version} does not match .grok-plugin/plugin.json version ${grok.version}`)
  }

  if (root.version !== devin.version) {
    throw new Error(`package.json version ${root.version} does not match .devin-plugin/plugin.json version ${devin.version}`)
  }

View on GitHub (pinned to c9c10f8c75)

Solutions

  1. Set both files to the same version: pick the intended version and update `package.json` and `.claude-plugin/plugin.json` to match
  2. Prefer letting release automation prepare versions rather than hand-bumping (per repo policy)
  3. Check recent merge history for a conflict resolution that dropped one version bump
  4. Re-run the validation after syncing to catch the other paired checks (antigravity, marketplaces)

Example fix

// before
// package.json: "version": "1.4.0"; plugin.json: "version": "1.3.0"
// after
// package.json: "version": "1.4.0"; plugin.json: "version": "1.4.0"
Defensive patterns

Strategy: validation

Validate before calling

import { readFileSync } from "node:fs"
const pkg = JSON.parse(readFileSync("package.json", "utf8"))
const ce = JSON.parse(readFileSync(".claude-plugin/plugin.json", "utf8"))
if (pkg.version !== ce.version) {
  throw new Error(`Sync versions: package.json=${pkg.version} vs plugin.json=${ce.version}`)
}

Type guard

function versionsInSync(pkgVersion: string, pluginVersion: string): boolean { return pkgVersion === pluginVersion }

Try / catch

try {
  const versions = await currentVersions()
} catch (error) {
  if (String(error).includes("does not match")) {
    console.error("Version drift detected; align package.json and plugin.json (prefer release automation)")
  } else throw error
}

Prevention

When it happens

Trigger: Calling `loadCurrentVersions()`/`currentVersions()`/`versions()` after one file was hand-bumped or updated without the other — e.g. editing `package.json` version but not `.claude-plugin/plugin.json` (or vice versa) during a manual release attempt.

Common situations: Hand-editing versions instead of letting release automation prepare them; a merge conflict resolved keeping one side's version; a bot PR bumping package.json while plugin.json update failed.

Related errors


AI-assisted analysis of EveryInc/compound-engineering-plugin@c9c10f8c75 (2026-08-31). Data as JSON: /api/errors/c6b44d343ca312d5. Report an issue: GitHub.