From e06ffeebf9e36b9802e8b506c60d4d81caa6f7ea Mon Sep 17 00:00:00 2001 From: denihs Date: Mon, 21 Oct 2024 17:08:52 -0400 Subject: [PATCH] - try to log the install error --- scripts/generate-dev-bundle.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/generate-dev-bundle.ps1 b/scripts/generate-dev-bundle.ps1 index 2223d04b06..c053fd3f0b 100644 --- a/scripts/generate-dev-bundle.ps1 +++ b/scripts/generate-dev-bundle.ps1 @@ -185,14 +185,16 @@ Function Add-NodeAndNpm { # Let's install the npm version we really want. Write-Host "Installing npm@${NPM_VERSION}..." -ForegroundColor Magenta - & "$tempNpmCmd" install --prefix="$dirLib" --no-bin-links --save ` - --cache="$dirNpmCache" --nodedir="$dirTempNode" npm@${NPM_VERSION} | - Write-Debug + $npmOutput = & "$tempNpmCmd" install --prefix="$dirLib" --no-bin-links --save ` + --cache="$dirNpmCache" --nodedir="$dirTempNode" npm@${NPM_VERSION} 2>&1 if ($LASTEXITCODE -ne 0) { + Write-Host "Error installing npm@${NPM_VERSION}:" -ForegroundColor Red + Write-Host $npmOutput -ForegroundColor Red throw "Couldn't install npm@${NPM_VERSION}." } + # After finishing up with our Node, let's put it in its final home # and abandon this local npm directory.