lerna/lerna · error · ValidationError
ECHANGES
ECHANGES
Error message
Local repository has un-committed changes
What it means
Error "Local repository has un-committed changes" thrown in lerna/lerna.
Source
Thrown at libs/commands/import/src/index.ts:131
// "--reverse",
// "HEAD",
// ]).split("\n");
if (!this.commits.length) {
throw new ValidationError("NOCOMMITS", `No git commits to import at "${inputPath}"`);
}
if (this.options.preserveCommit) {
// Back these up since they'll change for each commit
this.origGitEmail = this.execSync("git", ["config", "user.email"]);
this.origGitName = this.execSync("git", ["config", "user.name"]);
}
// Stash the repo's pre-import head away in case something goes wrong.
this.preImportHead = this.getCurrentSHA();
if (this.execSync("git", ["diff-index", "HEAD"])) {
throw new ValidationError("ECHANGES", "Local repository has un-committed changes");
}
this.logger.info(
"",
`About to import ${this.commits.length} commits from ${inputPath} into ${targetDir}`
);
if (this.options.yes) {
return true;
}
return promptConfirmation("Are you sure you want to import these commits onto the current branch?");
}
getPackageDirectories() {
return this.project.packageConfigs.filter((p) => p.endsWith("*")).map((p) => path.dirname(p));
}
View on GitHub (pinned to 35d15a1567)
When it happens
Trigger: Thrown at libs/commands/import/src/index.ts:131 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/48a17e05f8828ac5.
Report an issue: GitHub.