{"record":{"id":"8780f8b660061ad7","repo":"jackwener/OpenCLI","slug":"sub-plugin-pluginname-requires-opencli-mani","errorCode":null,"errorMessage":"Sub-plugin \"${pluginName}\" requires opencli ${manifestEntry.opencli}","messagePattern":"Sub-plugin \"(.+?)\" requires opencli (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugin.ts","lineNumber":989,"sourceCode":"): Array<{\n  name: string;\n  lockEntry: LockEntry;\n  manifestEntry: NonNullable<PluginManifest['plugins']>[string];\n}> {\n  const updatedPlugins: Array<{\n    name: string;\n    lockEntry: LockEntry;\n    manifestEntry: NonNullable<PluginManifest['plugins']>[string];\n  }> = [];\n\n  for (const [pluginName, entry] of Object.entries(lock)) {\n    if (entry.source.kind !== 'monorepo' || entry.source.repoName !== monoName) continue;\n    const manifestEntry = manifest.plugins?.[pluginName];\n    if (!manifestEntry || manifestEntry.disabled) {\n      throw new Error(`Installed sub-plugin \"${pluginName}\" no longer exists in ${cloneUrl}`);\n    }\n    if (manifestEntry.opencli && !checkCompatibility(manifestEntry.opencli)) {\n      throw new Error(`Sub-plugin \"${pluginName}\" requires opencli ${manifestEntry.opencli}`);\n    }\n\n    const subDir = resolveRepoContainedPath(tmpCloneDir, manifestEntry.path);\n    const validation = validatePluginStructure(subDir);\n    if (!validation.valid) {\n      throw new Error(`Updated sub-plugin \"${pluginName}\" is invalid:\\n- ${validation.errors.join('\\n- ')}`);\n    }\n    updatedPlugins.push({ name: pluginName, lockEntry: entry, manifestEntry });\n  }\n\n  return updatedPlugins;\n}\n\nfunction updateMonorepoLockEntries(\n  lock: Record<string, LockEntry>,\n  plugins: Array<{\n    name: string;\n    lockEntry: LockEntry;","sourceCodeStart":971,"sourceCodeEnd":1007,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/src/plugin.ts#L971-L1007","documentation":"During monorepo update, after confirming a sub-plugin still exists upstream, opencli checks its manifestEntry.opencli requirement with checkCompatibility. If the freshly pulled manifest demands an opencli version incompatible with the running one, the update is aborted. It is the update-time analogue of the install-time compatibility error (error 5331) but thrown as a plain Error.","triggerScenarios":"Updating a monorepo's sub-plugins after upstream raised the `opencli` range in a sub-plugin's manifest entry, while the locally installed opencli no longer satisfies it (e.g. upstream moved to a new major).","commonSituations":"Upstream adopted a new opencli major before you upgraded your CLI; you intentionally run an older opencli; mixed versions across machines sharing a config.","solutions":["Upgrade opencli to a version satisfying the requirement (`npm i -g opencli@latest`).","Pin/update to a previous revision of the monorepo that still supports your opencli version.","Skip updating until you can upgrade the CLI, if the tool allows partial updates."],"exampleFix":"// before\nopencli 1.9.0 with sub-plugin requiring ^2.0.0\n// after\nnpm install -g opencli@^2.0.0\nopencli plugin update my-mono","handlingStrategy":"retry","validationCode":"import semver from 'semver';\nfor (const [name, entry] of Object.entries(manifest.plugins ?? {})) {\n  if (entry.opencli && !semver.satisfies(opencliVersion, entry.opencli)) {\n    console.warn(`${name} requires opencli ${entry.opencli}; upgrade before updating`);\n  }\n}","typeGuard":"function updateSupported(entry: { opencli?: string }, current: string): boolean {\n  return !entry.opencli || semver.satisfies(current, entry.opencli);\n}","tryCatchPattern":"try {\n  await opencli.plugin.updateMonorepo(monoName);\n} catch (e) {\n  if (e.message.includes('requires opencli')) {\n    console.error('Upgrade opencli (`npm i -g opencli@latest`) or pin the repo to an older revision, then retry.');\n  } else throw e;\n}","preventionTips":["Upgrade opencli before pulling monorepo updates.","Watch upstream manifests for raised `opencli` requirements.","Pin monorepo revisions when you cannot upgrade the CLI."],"tags":["plugin","monorepo","version","compatibility","update"],"backgroundTag":"version-incompatibility","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}