jackwener/OpenCLI · error

Sub-plugin "${pluginName}" requires opencli ${manifestEntry.

Error message

Sub-plugin "${pluginName}" requires opencli ${manifestEntry.opencli}

What it means

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.

Source

Thrown at src/plugin.ts:989

): Array<{
  name: string;
  lockEntry: LockEntry;
  manifestEntry: NonNullable<PluginManifest['plugins']>[string];
}> {
  const updatedPlugins: Array<{
    name: string;
    lockEntry: LockEntry;
    manifestEntry: NonNullable<PluginManifest['plugins']>[string];
  }> = [];

  for (const [pluginName, entry] of Object.entries(lock)) {
    if (entry.source.kind !== 'monorepo' || entry.source.repoName !== monoName) continue;
    const manifestEntry = manifest.plugins?.[pluginName];
    if (!manifestEntry || manifestEntry.disabled) {
      throw new Error(`Installed sub-plugin "${pluginName}" no longer exists in ${cloneUrl}`);
    }
    if (manifestEntry.opencli && !checkCompatibility(manifestEntry.opencli)) {
      throw new Error(`Sub-plugin "${pluginName}" requires opencli ${manifestEntry.opencli}`);
    }

    const subDir = resolveRepoContainedPath(tmpCloneDir, manifestEntry.path);
    const validation = validatePluginStructure(subDir);
    if (!validation.valid) {
      throw new Error(`Updated sub-plugin "${pluginName}" is invalid:\n- ${validation.errors.join('\n- ')}`);
    }
    updatedPlugins.push({ name: pluginName, lockEntry: entry, manifestEntry });
  }

  return updatedPlugins;
}

function updateMonorepoLockEntries(
  lock: Record<string, LockEntry>,
  plugins: Array<{
    name: string;
    lockEntry: LockEntry;

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Upgrade opencli to a version satisfying the requirement (`npm i -g opencli@latest`).
  2. Pin/update to a previous revision of the monorepo that still supports your opencli version.
  3. Skip updating until you can upgrade the CLI, if the tool allows partial updates.

Example fix

// before
opencli 1.9.0 with sub-plugin requiring ^2.0.0
// after
npm install -g opencli@^2.0.0
opencli plugin update my-mono
Defensive patterns

Strategy: retry

Validate before calling

import semver from 'semver';
for (const [name, entry] of Object.entries(manifest.plugins ?? {})) {
  if (entry.opencli && !semver.satisfies(opencliVersion, entry.opencli)) {
    console.warn(`${name} requires opencli ${entry.opencli}; upgrade before updating`);
  }
}

Type guard

function updateSupported(entry: { opencli?: string }, current: string): boolean {
  return !entry.opencli || semver.satisfies(current, entry.opencli);
}

Try / catch

try {
  await opencli.plugin.updateMonorepo(monoName);
} catch (e) {
  if (e.message.includes('requires opencli')) {
    console.error('Upgrade opencli (`npm i -g opencli@latest`) or pin the repo to an older revision, then retry.');
  } else throw e;
}

Prevention

When it happens

Trigger: 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).

Common situations: Upstream adopted a new opencli major before you upgraded your CLI; you intentionally run an older opencli; mixed versions across machines sharing a config.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/8780f8b660061ad7. Report an issue: GitHub.