|
|
@@ -103,12 +103,12 @@ if ((Test-Path $npmCliPath) -and $npmCmd) {
|
|
|
}
|
|
|
|
|
|
if (-not $npmHealthy) {
|
|
|
- Write-Host '[WARN] npm missing; trying backup...' -ForegroundColor Yellow
|
|
|
+ Write-Host '[WARN] npm missing or broken; restoring from nodejs\backup\npm (robocopy)...' -ForegroundColor Yellow
|
|
|
if (Test-Path $npmBackupNpmDir) {
|
|
|
New-Item -ItemType Directory -Force -Path $nodeModulesPath | Out-Null
|
|
|
$nodeNpmDir = Join-Path $nodeModulesPath 'npm'
|
|
|
if (-not (Sync-DirRobocopyMirror -SourceDir $npmBackupNpmDir -DestDir $nodeNpmDir)) {
|
|
|
- Write-Host '[WARN] npm restore from backup (robocopy) failed' -ForegroundColor Yellow
|
|
|
+ Write-Host '[WARN] npm restore from nodejs\backup\npm failed (robocopy exit >= 8 or locks)' -ForegroundColor Yellow
|
|
|
}
|
|
|
if ((Test-Path $npmCliPath) -and $npmCmd) {
|
|
|
$npmVersion = & $npmCmd --version 2>$null
|