Repository navigation
Closed
Labels
area: @angular/clifreq1: lowOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Description
Command
build
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When which does not exist on the path, hasGlobalCliInstall does not resolve its promise. Then, maybe due to nodejs/node#22088, the process exits prematurely.
Minimal Reproduction
I got here running ng build from a nixpkgs build of PeerTube, which has a lot of layers, but this phenomenon of early exiting can be reproduced with a simple example:
const { execFile } = require('child_process');
(async function main () {
const proc = execFile("blah");
const exitCode = await new Promise((resolve) => {
proc.addListener('exit', (exitCode) => {
resolve(exitCode);
});
});
console.log("Exit code:", exitCode);
})();
Exception or Error
No response
Your Environment
❯ node_modules/.bin/ng version took 19s
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 14.2.2
Node: 18.9.0 (Unsupported)
Package Manager: yarn 1.22.19
OS: darwin arm64
Angular: 14.2.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
... service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1402.2
@angular-devkit/build-angular 14.2.2
@angular-devkit/core 14.2.2
@angular-devkit/schematics 14.2.2
@angular/cli 14.2.2
@schematics/angular 14.2.2
rxjs 7.5.6
typescript 4.8.3
webpack 5.74.0
Anything else relevant?
No response
Metadata
Metadata
Assignees
Labels
area: @angular/clifreq1: lowOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Activity
mostafaadelsalah commentedon Oct 4, 2022
fix(@angular/cli): handle missing `which` binary in path
fix(@angular/cli): handle missing `which` binary in path
fix(@angular/cli): handle missing `which` binary in path
fix(@angular/cli): handle missing `which` binary in path
angular-automatic-lock-bot commentedon Nov 7, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.