Fix Windows deployment scripts for missing Python dependencies
Issues fixed: 1. Build-Frontend.ps1: Add verification that requirements.txt is included in deployment package - Prevents incomplete packages that cause ModuleNotFoundError on server - Throws error if critical files are missing before package is transferred 2. Deploy-ROA2WEB.ps1: Auto-detect first deployment and force install dependencies - Automatically sets ForceInstallDependencies=true on first deployment - Add -ForceInstallDependencies parameter for manual override - Better error handling and validation for pip install - Shows clear error messages with manual recovery instructions This fixes the "ModuleNotFoundError: No module named 'httpx'" error that occurred when deploying to Windows Server without explicitly forcing dependency installation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -281,6 +281,15 @@ function Copy-BackendFiles {
|
||||
|
||||
$backendFiles = Get-ChildItem -Path $DestPath -Recurse -File
|
||||
Write-Success "Copied $(($backendFiles).Count) backend files"
|
||||
|
||||
# Verify critical files are present
|
||||
$requirementsTxt = Join-Path $DestPath "requirements.txt"
|
||||
if (-not (Test-Path $requirementsTxt)) {
|
||||
Write-Error "CRITICAL: requirements.txt not found in backend package!"
|
||||
Write-Host " Expected: $requirementsTxt" -ForegroundColor Red
|
||||
throw "Backend package incomplete - missing requirements.txt"
|
||||
}
|
||||
Write-Success "Verified: requirements.txt present"
|
||||
}
|
||||
|
||||
function New-DeploymentPackage {
|
||||
|
||||
Reference in New Issue
Block a user