vercel/turborepo · warning
Found catalog reference but ${catalogFileName} does not exis
Error message
Found catalog reference but ${catalogFileName} does not exist What it means
Emitted by the update-catalog step of turbo-codemod's `migrate` command. It resolves a `catalog:` specifier for turbo in the root package.json and needs the package manager's catalog file (CATALOG_FILES maps pnpm to pnpm-workspace.yaml and yarn to .yarnrc.yml) at the repo root; when that file is missing the step warns and returns undefined, so the catalog-based turbo update is skipped for this run.
Source
Thrown at packages/turbo-codemod/src/commands/migrate/steps/update-catalog.ts:64
} else if (packageJson.dependencies && "turbo" in packageJson.dependencies) {
turboSpecifier = packageJson.dependencies.turbo;
installType = "dependencies";
} else {
return undefined;
}
if (!turboSpecifier?.startsWith("catalog:")) {
return undefined;
}
const catalogFileName = CATALOG_FILES[packageManager];
if (!catalogFileName) {
return undefined;
}
const catalogFile = path.join(root, catalogFileName);
if (!fs.existsSync(catalogFile)) {
logger.warn(
`Found catalog reference but ${catalogFileName} does not exist`
);
return undefined;
}
const ref = turboSpecifier.slice("catalog:".length);
const catalogName = ref === "" || ref === "default" ? null : ref;
return { catalogName, catalogFile, installType };
}
/**
* Update the turbo version in a catalog file (pnpm-workspace.yaml or .yarnrc.yml).
* Preserves the existing version range prefix (^, ~, etc.) and YAML formatting.
*
* Returns true if the catalog was updated.
*/
export function updateCatalogVersion({View on GitHub (pinned to f9245100cf)
Solutions
- Ensure pnpm-workspace.yaml (or .yarnrc.yml) exists at the repo root and contains the catalog entry
- Run the codemod from the repository root
- If catalogs are no longer used, replace the `catalog:` specifier with an explicit version before migrating
Example fix
# before: package.json references a catalog with no backing file
"devDependencies": { "turbo": "catalog:" }
# pnpm-workspace.yaml missing
# after: pnpm-workspace.yaml
packages:
- 'apps/*'
- 'packages/*'
catalog:
turbo: '^2.3.3' Defensive patterns
Strategy: validation
Validate before calling
import fs from 'node:fs';
import path from 'node:path';
// before running the codemod
const catalog = path.join(repoRoot, 'pnpm-workspace.yaml');
if (specifier.startsWith('catalog:') && !fs.existsSync(catalog)) {
throw new Error(`catalog reference requires ${catalog} to exist`);
} Prevention
- Run @turbo/codemod migrate from the repository root so root/catalog resolution is correct
- Keep pnpm-workspace.yaml (and .yarnrc.yml for yarn) at the root and in version control
- Replace stale `catalog:` specifiers when migrating off pnpm catalogs
When it happens
Trigger: Running `npx @turbo/codemod migrate` where the root package.json has `"turbo": "catalog:"` or `catalog:<name>` for pnpm or yarn, but the corresponding catalog file (pnpm-workspace.yaml / .yarnrc.yml) does not exist at the resolved root.
Common situations: pnpm-workspace.yaml renamed, moved, or never committed; codemod invoked from a subdirectory so root resolution picks the wrong folder; catalog references left behind after migrating off pnpm.
Related errors
- Could not find turbo in ${catalogName ? `catalog "${catalogN
- package_manager-unexpected
- Cannot infer turbo version due to use of `catalog` protocol.
- Invalid version: ${version}
- New workspace root detected - unexpected pnpm-workspace.yaml
AI-assisted analysis of vercel/turborepo@f9245100cf (2026-08-17).
Data as JSON: /api/errors/c412d05c5dab5ded.
Report an issue: GitHub.