From 17e0d200635c3383e624224177e9e648c9d307a5 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Tue, 15 Apr 2025 17:37:54 -0600 Subject: [PATCH] Added NPX Fix for Deployment Edge Cases --- Launch-Borealis.ps1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Launch-Borealis.ps1 b/Launch-Borealis.ps1 index 6c3777d..fc5e115 100644 --- a/Launch-Borealis.ps1 +++ b/Launch-Borealis.ps1 @@ -87,12 +87,10 @@ switch ($choice) { # ---------------------- Server: Create Python Virtual Environment & Prepare Files ---------------------- Run-Step "Create Borealis Virtual Python Environment" { # Create virtual environment if it does not exist - Write-Host "Create virtual environment if it does not exist" if (!(Test-Path "$venvFolder\Scripts\Activate")) { python -m venv $venvFolder | Out-Null } # Copy server data if the Data folder exists - Write-Host "Copy server data if the Data folder exists" if (Test-Path $dataSource) { if (Test-Path $dataDestination) { Remove-Item -Recurse -Force $dataDestination | Out-Null @@ -103,24 +101,20 @@ switch ($choice) { Write-Host "`r$($symbols.Info) Warning: Data folder not found, skipping copy." -ForegroundColor Yellow } # React UI Deployment: Create default React app if no deployment folder exists - Write-Host "React UI Deployment: Create default React app if no deployment folder exists" if (-not (Test-Path $webUIDestination)) { - npx create-react-app $webUIDestination | Out-Null + npx --yes create-react-app "$webUIDestination" --verbose | Out-Null } # Copy custom UI if it exists - Write-Host "Copy custom UI if it exists" if (Test-Path $customUIPath) { Copy-Item -Path "$customUIPath\*" -Destination $webUIDestination -Recurse -Force } else { Write-Host "`r$($symbols.Info) No custom UI found, using default React app." -ForegroundColor Yellow } # Remove any existing React build folders - Write-Host "Remove any existing React build folders" if (Test-Path "$webUIDestination\build") { Remove-Item -Path "$webUIDestination\build" -Recurse -Force } # Activate the Python virtual environment - Write-Host "Activate the Python virtual environment" . "$venvFolder\Scripts\Activate" }