vercel/turborepo · error · ConvertError
package_manager-could_not_be_found
package_manager-could_not_be_found
Error message
${convertTo.name} is not installed, or could not be located What it means
convertProject() requires the target package manager's version to be resolvable (convertTo.version). A missing version means the manager binary could not be located or interrogated, so it throws ConvertError type package_manager-could_not_be_found instead of shelling out to a command that does not exist.
Source
Thrown at packages/turbo-workspaces/src/convert.ts:47
}: {
project: Project;
convertTo: RequestedPackageManagerDetails;
logger: Logger;
options?: Options;
}) {
logger.header(
`Converting project from ${project.packageManager} to ${convertTo.name}.`
);
if (!options?.ignoreUnchangedPackageManager) {
if (project.packageManager === convertTo.name) {
throw new ConvertError("You are already using this package manager", {
type: "package_manager-already_in_use"
});
}
if (!convertTo.version) {
throw new ConvertError(
`${convertTo.name} is not installed, or could not be located`,
{
type: "package_manager-could_not_be_found"
}
);
}
}
// this cast is safe since we've just verified that the version exists above
const to = convertTo as AvailablePackageManagerDetails;
// remove old workspace data
if (!options?.ignoreUnchangedPackageManager) {
await MANAGERS[project.packageManager].remove({
project,
to,
logger,
optionsView on GitHub (pinned to 9f94a7d215)
Solutions
- Install the target manager (e.g. npm i -g pnpm, or bun's official installer) and confirm `<manager> --version` works in the same shell
- Re-run the conversion after ensuring the binary is on PATH
- If it is installed but undetected, fix PATH ordering or invoke the conversion from a shell where the manager resolves
Example fix
# before: bun not installed npx @turbo/workspaces convert --to bun # 'bun is not installed...' # after curl -fsSL https://bun.sh/install | bash bun --version # sanity check, then re-run
Defensive patterns
Strategy: validation
Validate before calling
import { execSync } from "node:child_process";
function managerVersion(command: string): string | undefined {
try {
return execSync(`${command} --version`, { stdio: "pipe" }).toString().trim();
} catch {
return undefined;
}
}
if (!managerVersion(convertTo.name)) {
throw new Error(`Install ${convertTo.name} before converting`);
} Type guard
function isManagerMissingError(e: unknown): boolean {
return e instanceof ConvertError && e.type === "package_manager-could_not_be_found";
} Try / catch
try {
await convertProject({ project, convertTo, logger });
} catch (e) {
if (e instanceof ConvertError && e.type === "package_manager-could_not_be_found") {
// prompt: `pnpm not found — install it?` then retry after install
} else throw e;
} Prevention
- Pre-flight check `<manager> --version` in conversion scripts
- Install the target manager before running conversions in CI
- Ensure the shell running the conversion has the manager's bin directory on PATH
When it happens
Trigger: Targeting npm/pnpm/yarn/bun/nub/aube when the binary is not installed or not on PATH, so the version lookup that built the RequestedPackageManagerDetails produced no version. Bypassed only by options.ignoreUnchangedPackageManager.
Common situations: Converting to bun on a machine that never installed bun; CI images lacking the target manager; nvm/volta shims inactive in the current shell; Windows PATH missing the .cmd shim.
Related errors
- package_manager-already_in_use
- package_manager-unsupported_version
- bun-workspace_glob_error
- Unable to update README.md
- invalid_directory
AI-assisted analysis of vercel/turborepo@9f94a7d215 (2026-08-16).
Data as JSON: /api/errors/3a180d03a1185f56.
Report an issue: GitHub.