angular/angular-cli · error · Error
The configured package manager, '${this.descriptor.binary}',
Error message
The configured package manager, '${this.descriptor.binary}', does not support a custom registry. What it means
Thrown by the package manager's #run method when a custom registry is requested but the resolved package manager descriptor does not define getRegistryOptions, i.e. the manager has no CLI flags for pointing at a custom registry. The command is aborted rather than run against the wrong registry.
Source
Thrown at packages/angular/cli/src/package-managers/package-manager.ts:201
}
}
}
async #run(
args: readonly string[],
options: { timeout?: number; registry?: string; cwd?: string } = {},
): Promise<{ stdout: string; stderr: string }> {
return this.#runWithThrottle(async () => {
this.ensureInstalled();
const { registry, cwd, ...runOptions } = options;
const finalArgs = [...args];
let finalEnv: Record<string, string> | undefined;
if (registry) {
const registryOptions = this.descriptor.getRegistryOptions?.(registry);
if (!registryOptions) {
throw new Error(
`The configured package manager, '${this.descriptor.binary}', does not support a custom registry.`,
);
}
if (registryOptions.args) {
finalArgs.push(...registryOptions.args);
}
if (registryOptions.env) {
finalEnv = registryOptions.env;
}
}
const executionDirectory = cwd ?? this.cwd;
if (this.options.dryRun) {
this.options.logger?.info(
`[DRY RUN] Would execute in [${executionDirectory}]: ${this.descriptor.binary} ${finalArgs.join(' ')}`,
);
View on GitHub (pinned to bb72145f9a)
Solutions
- Configure the registry natively via .npmrc/.yarnrc.yml/pnpm config instead of passing a custom registry to the CLI call.
- Use a supported package manager (npm/yarn/pnpm) whose descriptor supports registries.
- Remove the registry parameter so the manager's default configuration is used.
- Update Angular CLI so the descriptor for your manager includes getRegistryOptions.
Example fix
// before
pm.install({ registry: 'https://registry.mycompany.com' }) // manager lacks registry support
// after (.npmrc)
registry=https://registry.mycompany.com
// then
pm.install() Defensive patterns
Strategy: fallback
Validate before calling
const supportsRegistry = typeof descriptor.getRegistryOptions === 'function';
if (registry && !supportsRegistry) {
// fall back to native config (.npmrc) instead of passing registry to the call
} Type guard
function supportsCustomRegistry(descriptor) {
return typeof descriptor?.getRegistryOptions === 'function';
} Try / catch
try {
await pm.install({ registry });
} catch (e) {
if (e.message.includes('does not support a custom registry')) {
// write registry into .npmrc / .yarnrc.yml and invoke install without the registry option
}
} Prevention
- Configure corporate registries via .npmrc/.yarnrc.yml rather than per-call options.
- Check whether the active manager descriptor supports registries before passing one.
- Keep one canonical registry configuration for all tooling.
- Pin to npm/yarn/pnpm when custom-registry passthrough is required.
When it happens
Trigger: Calling install/add/acquireTempPackage (or registry-backed fetches during ng update) with a registry argument while using a package manager descriptor without registry support; custom registry passthrough used with an exotic manager.
Common situations: Corporate environments requiring an internal npm registry mirror; scripts passing --registry-style options generically regardless of manager; descriptor set for a manager (like a shimmed binary) that lacks registry option mapping.
Related errors
- Unsupported package manager: "${name}"
- ${parsedError.summary}
- Unable to load package information from registry.
- An unexpected error happened; package ${name} has no version
- Failed to parse package manager output: ${e instanceof Error
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/af2138ed397c9d71.
Report an issue: GitHub.