lerna/lerna · error · ValidationError
ENOENT
ENOENT
Error message
No pnpm-workspace.yaml found. See https://pnpm.io/workspaces for help configuring workspaces in pnpm.
What it means
Error "No pnpm-workspace.yaml found. See https://pnpm.io/workspaces for help configuring workspaces in pnpm." thrown in lerna/lerna.
Source
Thrown at libs/core/src/lib/project/index.ts:326
"ECONFIGWORKSPACES",
`The "useWorkspaces" option has been removed. By default lerna will resolve your packages using your package manager's workspaces configuration. Alternatively, you can manually provide a list of package globs to be used instead via the "packages" option in lerna.json.`
);
}
}
#resolvePnpmWorkspaceConfig(): PnpmWorkspaceConfig {
let config: PnpmWorkspaceConfig;
try {
const configLocation = path.join(this.rootPath, "pnpm-workspace.yaml");
const configContent = fs.readFileSync(configLocation, { encoding: "utf8" });
config = load(configContent) as PnpmWorkspaceConfig;
} catch (err) {
// TODO: refactor to address type issues
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (err.message.includes("ENOENT: no such file or directory")) {
throw new ValidationError(
"ENOENT",
"No pnpm-workspace.yaml found. See https://pnpm.io/workspaces for help configuring workspaces in pnpm."
);
}
// TODO: refactor to address type issues
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
throw new ValidationError(err.name, err.message);
}
return config;
}
/**
* By default, the user's package manager workspaces configuration will be used to resolve packages.
* However, they can optionally specify an explicit set of package globs to be used instead.
*View on GitHub (pinned to 35d15a1567)
When it happens
Trigger: Thrown at libs/core/src/lib/project/index.ts:326 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of lerna/lerna@35d15a1567 (2026-08-27).
Data as JSON: /api/errors/5d85d63a3c26014b.
Report an issue: GitHub.