{
  "id": "cicd/npm-ci-lockfile-outdated",
  "signature": "npm ERR! code EUSAGE npm ERR! `npm ci` can only install packages when your package-lock.json or npm-shrinkwrap.json is in sync with package.json",
  "signature_zh": "npm 错误！代码 EUSAGE npm 错误！`npm ci` 只能在 package-lock.json 或 npm-shrinkwrap.json 与 package.json 同步时安装包",
  "regex": "npm ci can only install packages when your package-lock.json.*is in sync with package.json",
  "domain": "cicd",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "npm ci failed because package-lock.json is out of sync with package.json, often due to manual edits to package.json without running npm install to update the lockfile.",
  "root_cause_type": "generic",
  "root_cause_zh": "npm ci 失败，因为 package-lock.json 与 package.json 不同步，通常是由于手动编辑 package.json 而未运行 npm install 更新锁文件。",
  "versions": [
    {
      "version": "npm 9.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Node.js 18.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "npm 10.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Deleting node_modules and package-lock.json and re-running npm install may break CI reproducibility by generating a different lockfile.",
      "fail_rate": 0.2,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Running npm audit fix can modify package.json or lockfile, introducing unintended changes.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Regenerate the lockfile by running: npm install && git add package-lock.json && git commit -m 'Update lockfile'. Then retry npm ci.",
      "success_rate": 0.95,
      "how": "Regenerate the lockfile by running: npm install && git add package-lock.json && git commit -m 'Update lockfile'. Then retry npm ci.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the discrepancy is due to version ranges, pin exact versions in package.json to avoid lockfile drift.",
      "success_rate": 0.85,
      "how": "If the discrepancy is due to version ranges, pin exact versions in package.json to avoid lockfile drift.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Regenerate the lockfile by running: npm install && git add package-lock.json && git commit -m 'Update lockfile'. Then retry npm ci.",
    "If the discrepancy is due to version ranges, pin exact versions in package.json to avoid lockfile drift."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.npmjs.com/cli/v9/commands/npm-ci",
  "official_doc_section": null,
  "error_code": "EUSAGE",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-04-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}