ReactiveX/rxjs · error · Error

Cannot locate the canonical Skill shipped by @rxjs/migrate.

Error message

Cannot locate the canonical Skill shipped by @rxjs/migrate.

What it means

Thrown by resolveCanonicalSkillRoot when neither ../skill nor ../../skill relative to the CLI's module directory contains a SKILL.md file. The canonical Skill payload that the CLI installs is missing from the package layout — typically a broken or partial install of @rxjs/migrate.

Source

Thrown at packages/migrate/src/skill-cli.ts:67

      status: 'error',
      error: { code: refused ? 'refused' : 'operational-failure', message },
    });
    return refused ? skillCliExitCodes.refused : skillCliExitCodes.operationalFailure;
  }
}

export async function resolveCanonicalSkillRoot(modulePath = process.argv[1]): Promise<string> {
  if (!modulePath) throw new Error('Cannot locate the @rxjs/migrate package entry point.');
  const moduleDirectory = dirname(resolve(modulePath));
  for (const localPath of ['../skill', '../../skill']) {
    const candidate = resolve(moduleDirectory, localPath);
    try {
      if ((await stat(join(candidate, 'SKILL.md'))).isFile()) return candidate;
    } catch {
      // Try the source-tree or built-package alternative.
    }
  }
  throw new Error('Cannot locate the canonical Skill shipped by @rxjs/migrate.');
}

function parseSkillArguments(argv: readonly string[]): ParsedSkillCliOptions {
  const action = argv[0];
  if (action !== 'check' && action !== 'install' && action !== 'update' && action !== 'remove') {
    throw new Error(
      'Usage: rxjs-migrate-skill <check|install|update|remove> --harness <codex|claude|cursor> [--project-root <dir>] [--force]'
    );
  }
  let harness: SkillHarness | undefined;
  let projectRoot = process.cwd();
  let force = false;
  for (let index = 1; index < argv.length; index++) {
    const argument = argv[index];
    if (argument === '--harness') {
      const value = argv[++index];
      if (!value || !skillHarnesses.includes(value as SkillHarness)) throw new Error('--harness requires codex, claude, or cursor');
      harness = value as SkillHarness;

View on GitHub (pinned to 54796b38a5)

Solutions

  1. Reinstall @rxjs/migrate cleanly (rm -rf node_modules and lockfile entry, then reinstall)
  2. Verify packages/migrate/skill/SKILL.md (or dist-adjacent skill folder) exists in the installed package
  3. If running from a fork/monorepo, ensure the skill assets are built/copied next to the CLI entry
Defensive patterns

Strategy: fallback

Validate before calling

import { stat } from 'node:fs/promises';
const ok = await stat(require.resolve('@rxjs/migrate/package.json')).then(() => true).catch(() => false);

Prevention

When it happens

Trigger: Running rxjs-migrate-skill check/install when the package's skill directory was pruned, the publish excluded skill files, or the CLI was moved out of its package tree.

Common situations: Aggressive packagers (pnpm strict layout, bundlers) omitting the skill folder; installing from a fork that didn't include skill assets; moving the built CLI file elsewhere.

Related errors


AI-assisted analysis of ReactiveX/rxjs@54796b38a5 (2026-08-28). Data as JSON: /api/errors/20f4bd3a0826ea09. Report an issue: GitHub.