fix(ngcc): improve lockfile error message (#35001)

The message now gives concrete advice to developers who
experience the error due to running multiple simultaneous builds
via webpack.

Fixes #35000

PR Close #35001
This commit is contained in:
Pete Bacon Darwin 2020-01-28 10:13:08 +00:00 committed by Andrew Kushnir
parent e7c74cbd69
commit 7f44fa65a7
2 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,8 @@ export class LockFile {
throw new Error(
`ngcc is already running at process with id ${pid}.\n` +
`If you are running multiple builds in parallel then you should pre-process your node_modules via the command line ngcc tool before starting the builds;\n` +
`See https://v9.angular.io/guide/ivy#speeding-up-ngcc-compilation.\n` +
`(If you are sure no ngcc process is running then you should delete the lockfile at ${this.lockFilePath}.)`);
}
}

View File

@ -183,6 +183,8 @@ runInEachFileSystem(() => {
expect(() => lockFile.create())
.toThrowError(
`ngcc is already running at process with id 188.\n` +
`If you are running multiple builds in parallel then you should pre-process your node_modules via the command line ngcc tool before starting the builds;\n` +
`See https://v9.angular.io/guide/ivy#speeding-up-ngcc-compilation.\n` +
`(If you are sure no ngcc process is running then you should delete the lockfile at ${lockFile.lockFilePath}.)`);
});
});