angular/angular-cli · error · Error
Unsupported package manager: "${name}"
Error message
Unsupported package manager: "${name}" What it means
Thrown by createPackageManager when the package manager name determined for the workspace (from config, lockfile detection, or user option) has no entry in SUPPORTED_PACKAGE_MANAGERS. The factory only knows how to construct descriptors for npm, yarn, pnpm, etc., and fails fast otherwise.
Source
Thrown at packages/angular/cli/src/package-managers/factory.ts:144
* @returns A promise that resolves to a new `PackageManager` instance.
*/
export async function createPackageManager(options: {
cwd: string;
configuredPackageManager?: ConfiguredPackageManagerInfo;
logger?: Logger;
dryRun?: boolean;
tempDirectory?: string;
}): Promise<PackageManager> {
const { cwd, configuredPackageManager, logger, dryRun, tempDirectory } = options;
const host = NodeJS_HOST;
const result = await determinePackageManager(host, cwd, configuredPackageManager, logger, dryRun);
const { name, source } = result;
let { version } = result;
const descriptor = SUPPORTED_PACKAGE_MANAGERS[name];
if (!descriptor) {
throw new Error(`Unsupported package manager: "${name}"`);
}
// Do not verify if the package manager is installed during a dry run.
let initializationError: Error | undefined;
if (!dryRun && !version) {
try {
version = await getPackageManagerVersion(host, cwd, name, logger);
} catch {
if (source === 'default') {
initializationError = new Error(
`'${DEFAULT_PACKAGE_MANAGER}' was selected as the default package manager, but it is not installed or` +
` cannot be found in the PATH. Please install '${DEFAULT_PACKAGE_MANAGER}' to continue.`,
);
} else {
initializationError = new Error(
`The project is configured to use '${name}', but it is not installed or cannot be` +
` found in the PATH. Please install '${name}' to continue.`,
);View on GitHub (pinned to bb72145f9a)
Solutions
- Change the configured package manager to a supported one (npm, yarn, or pnpm).
- Fix typos in the packageManager setting in angular.json or CLI options.
- Upgrade Angular CLI to a version that supports your package manager.
- Remove the override so lockfile auto-detection picks a supported manager.
Example fix
// before (angular.json)
"cli": { "packageManager": "bun" }
// after
"cli": { "packageManager": "pnpm" } Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = ['npm', 'yarn', 'pnpm', 'bun']; // check your CLI version's supported list
const configured = angularJson.cli?.packageManager;
if (configured && !SUPPORTED.includes(configured)) {
throw new Error(`packageManager "${configured}" is not supported by this Angular CLI version`);
} Type guard
function isSupportedManager(name) {
return ['npm', 'yarn', 'pnpm'].includes(name);
} Try / catch
try {
await ngUpdate(packages);
} catch (e) {
if (e.message.includes('Unsupported package manager')) {
// retry with an explicit supported manager, e.g. --package-manager npm
}
} Prevention
- Keep packageManager in angular.json limited to supported values.
- Before adopting a new manager, confirm Angular CLI support for your version.
- Avoid free-form env overrides of the package manager in CI.
- Upgrade the CLI when your team switches package managers.
When it happens
Trigger: Setting an unsupported packageManager in angular.json CLI config (e.g. "bun", "cnpm"); environment or config producing an unexpected manager name; typos in the configured value.
Common situations: Teams adopting newer managers (bun, deno-based tooling) that Angular CLI's factory does not recognize; misconfigured angular.json after manual edits; CI env vars overriding the manager with an unsupported name.
Related errors
- The configured package manager, '${this.descriptor.binary}',
- ${parsedError.summary}
- Failed to parse package manager output: ${e instanceof Error
- Invalid semver version for ${this.name}: "${this.#version}"
- Project "${project}" does not exist.
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/3c556c401a9378a9.
Report an issue: GitHub.