diff --git a/lib/cli/src/js-package-manager/JsPackageManager.ts b/lib/cli/src/js-package-manager/JsPackageManager.ts index 54a81a945c4e..39e0c78f873c 100644 --- a/lib/cli/src/js-package-manager/JsPackageManager.ts +++ b/lib/cli/src/js-package-manager/JsPackageManager.ts @@ -224,6 +224,6 @@ export abstract class JsPackageManager { throw new Error(commandResult.stderr.toString()); } - return commandResult.stdout.toString(); + return commandResult.stdout ? commandResult.stdout.toString() : ''; } }