{"record":{"id":"142ab1b9ada4d585","repo":"vercel/turborepo","slug":"package-manager-unsupported-version","errorCode":"package_manager-unsupported_version","errorMessage":"Unsupported package manager version.","messagePattern":"Unsupported package manager version\\.","errorType":"exception","errorClass":"ConvertError","httpStatus":null,"severity":"error","filePath":"packages/turbo-workspaces/src/install.ts","lineNumber":130,"sourceCode":"  const { version, name } = packageManager;\n  if (version) {\n    return PACKAGE_MANAGERS[name].find((manager) =>\n      satisfies(version, manager.semver)\n    );\n  }\n  return PACKAGE_MANAGERS[name].find((manager) => {\n    return manager.default;\n  });\n}\n\nexport async function install(args: InstallArgs) {\n  const { to, logger, options } = args;\n\n  const installLogger = logger ?? new Logger(options);\n  const packageManager = getPackageManagerMeta(to);\n\n  if (!packageManager) {\n    throw new ConvertError(\"Unsupported package manager version.\", {\n      type: \"package_manager-unsupported_version\"\n    });\n  }\n\n  installLogger.subStep(\n    `running \"${packageManager.command} ${packageManager.installArgs.join(\n      \" \"\n    )}\"`\n  );\n  if (!options?.dry) {\n    let spinner;\n    if (installLogger.interactive) {\n      spinner = ora({\n        text: \"installing dependencies...\",\n        spinner: {\n          frames: installLogger.installerFrames()\n        }\n      }).start();","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/vercel/turborepo/blob/9f94a7d215b3881942527dd526afa3fc650869d5/packages/turbo-workspaces/src/install.ts#L112-L148","documentation":"install() selects install instructions via getPackageManagerMeta(): with a known version it finds the PACKAGE_MANAGERS entry whose semver range matches (pnpm '6.x' vs '>=7', yarn '<2' vs '>=2', bun '^1.0.1'); with no version it takes the default entry. If the version satisfies no range, it throws ConvertError type package_manager-unsupported_version before running the install command.","triggerScenarios":"Converting with a target version outside every supported range: pnpm 5.x or older, bun 0.x, or a prerelease version string that semver.satisfies rejects (prereleases don't satisfy ranges by default).","commonSituations":"Legacy repos pinned to pnpm 5; old global manager installs; user-supplied version strings in conversion scripts; experimental canary versions.","solutions":["Upgrade the target manager to a supported major (pnpm >= 7, yarn 1.x or >= 2, bun >= 1.0.1) and re-run","Omit the explicit version so the default PACKAGE_MANAGERS entry is used","Check the detected version (`pnpm --version`) against the ranges declared in packages/turbo-workspaces/src/install.ts"],"exampleFix":"# before: pnpm 5.18 detected, satisfies neither 6.x nor >=7\npnpm --version # 5.18.10\n\n# after\nnpm i -g pnpm@latest\npnpm --version # 9.x — retry the conversion","handlingStrategy":"validation","validationCode":"import { satisfies } from \"semver\";\n\nconst SUPPORTED: Record<string, Array<string>> = {\n  pnpm: [\"6.x\", \">=7\"],\n  yarn: [\"<2\", \">=2\"],\n  bun: [\"^1.0.1\"],\n  npm: [\"*\"]\n};\n\nconst version = execSync(`${convertTo.name} --version`).toString().trim();\nconst supported = SUPPORTED[convertTo.name]?.some((range) => satisfies(version, range));\nif (!supported) throw new Error(`${convertTo.name}@${version} is unsupported; upgrade first`);","typeGuard":"function isUnsupportedVersionError(e: unknown): boolean {\n  return e instanceof ConvertError && e.type === \"package_manager-unsupported_version\";\n}","tryCatchPattern":"try {\n  await install({ project, to, logger, options });\n} catch (e) {\n  if (e instanceof ConvertError && e.type === \"package_manager-unsupported_version\") {\n    // suggest upgrading the target manager, then re-run the conversion\n  } else throw e;\n}","preventionTips":["Check the installed manager version against turbo-workspaces' semver ranges before converting","Upgrade old pnpm 5/6 or bun 0.x installs before migrations","In automation, branch on ConvertError.type === 'package_manager-unsupported_version' to route to an upgrade hint"],"tags":["package-manager","semver","conversion","version-mismatch"],"backgroundTag":"unsupported-package-manager-version","analyzedSha":"9f94a7d215b3881942527dd526afa3fc650869d5","analyzedAt":"2026-08-16T19:47:29.531Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}