ruvnet/ruflo · error · Error

Deployment type ${target.type} not yet implemented

Error message

Deployment type ${target.type} not yet implemented

What it means

The legacy deploy() helper only implements target.type === 'npm' (it delegates to Publisher.publishToNpm with tag/dryRun from config). The DeploymentTarget union also declares 'docker' and 'github-release', but those branches only log the target name and throw 'not yet implemented'.

Source

Thrown at v3/@claude-flow/deployment/src/index.ts:86

  });
}

/**
 * Legacy deploy function
 * @deprecated Use publishToNpm from publisher instead
 */
export async function deploy(target: DeploymentTarget): Promise<void> {
  if (target.type === 'npm') {
    const { Publisher } = await import('./publisher.js');
    const publisher = new Publisher();

    await publisher.publishToNpm({
      tag: (target.config.tag as string) || 'latest',
      dryRun: (target.config.dryRun as boolean) || false
    });
  } else {
    console.log(`Deploying to ${target.name} (${target.type})`);
    throw new Error(`Deployment type ${target.type} not yet implemented`);
  }
}

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Use type: 'npm' with config { tag, dryRun } — the only implemented target
  2. For GitHub releases or Docker images, run those steps outside this helper (e.g. `gh release create`, `docker buildx build`) after publishing via npm
  3. Prefer the non-deprecated publishToNpm() export instead of deploy(); deploy() is marked @deprecated

Example fix

// before
await deploy({ name: 'gh', type: 'github-release', config: { tag: 'v1.2.3' } }); // throws

// after
await publishToNpm({ tag: 'latest' });
await execSync('gh release create v1.2.3 --generate-notes');
Defensive patterns

Strategy: type-guard

Type guard

interface DeploymentTarget { name: string; type: 'npm' | 'docker' | 'github-release'; config: Record<string, unknown>; }
function isNpmTarget(t: DeploymentTarget): t is DeploymentTarget & { type: 'npm' } {
  return t.type === 'npm';
}
if (!isNpmTarget(target)) throw new Error(`unsupported deploy target: ${target.type}`);
await deploy(target);

Prevention

When it happens

Trigger: deploy({ name: 'container', type: 'docker', config: {} }) or deploy({ name: 'gh', type: 'github-release', config: {} }) — any call whose target.type is not 'npm'.

Common situations: Deployment configs written against the full union because the type suggests all three are supported; scripts migrated from docs or examples that list docker/github-release targets; upgrading versions expecting the other providers to have landed.

Related errors


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/5b5a7e06081b9954. Report an issue: GitHub.