ruvnet/ruflo · error · Error
Invalid package name: ${spec}
Error message
Invalid package name: ${spec} What it means
Error "Invalid package name: ${spec}" thrown in ruvnet/ruflo.
Source
Thrown at v3/@claude-flow/cli/src/plugins/manager.ts:35
// supported invocation is via a real `.exe` shell. We wrap every npm call
// through `cmd.exe /d /s /c npm <args>`, which keeps Node's safe array-form
// argument escaping intact and avoids both ENOENT and EINVAL.
const isWindows = process.platform === 'win32';
function runNpm(args: string[], timeoutMs: number): Promise<{ stdout: string; stderr: string }> {
if (isWindows) {
return execFileAsync('cmd.exe', ['/d', '/s', '/c', 'npm', ...args], { timeout: timeoutMs });
}
return execFileAsync('npm', args, { timeout: timeoutMs });
}
/**
* Validate npm package name to prevent shell injection (S-3)
*/
const VALID_PACKAGE_RE = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*(@[a-z0-9._\-^~>=<]+)?$/;
function validatePackageName(spec: string): void {
if (!VALID_PACKAGE_RE.test(spec)) {
throw new Error(`Invalid package name: ${spec}`);
}
}
// ============================================================================
// Types
// ============================================================================
export interface InstalledPlugin {
name: string;
version: string;
installedAt: string;
enabled: boolean;
source: 'npm' | 'local' | 'ipfs';
path?: string;
commands?: string[];
hooks?: string[];
config?: Record<string, unknown>;
}View on GitHub (pinned to 6b01dc5a68)
When it happens
Trigger: Thrown at v3/@claude-flow/cli/src/plugins/manager.ts:35 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ruvnet/ruflo@6b01dc5a68 (2026-08-12).
Data as JSON: /api/errors/861bec185a090874.
Report an issue: GitHub.