PozoAppCommonUpdatedCode/CHECK-REAL-ISSUE.bat

70 lines
1.8 KiB
Batchfile
Raw Normal View History

2025-12-05 09:45:16 +05:30
@echo off
REM Check Real Issue - Be Honest
echo ========================================
echo REAL ISSUE CHECK
echo ========================================
echo.
echo [1] Checking if iisnode is actually installed...
if exist "C:\Program Files\iisnode\iisnode.dll" (
echo [OK] iisnode.dll exists
) else (
echo [ERROR] iisnode.dll NOT FOUND!
echo [INFO] iisnode might not be installed properly
echo [INFO] Download from: https://github.com/Azure/iisnode/releases
pause
exit /b 1
)
echo.
echo [2] Checking Node.js...
where node >nul 2>&1
if %errorLevel% equ 0 (
node --version
echo [OK] Node.js found
) else (
echo [ERROR] Node.js not in PATH!
pause
exit /b 1
)
echo.
echo [3] Checking if server.cjs can run...
cd /d "%~dp0dist"
node server.cjs 2>&1 | findstr /C:"EADDRINUSE" /C:"Error" /C:"listening" >nul
if %errorLevel% equ 0 (
echo [OK] server.cjs code is valid (port error is expected)
) else (
echo [WARNING] server.cjs might have issues
)
echo.
echo [4] Checking web.config...
cd /d "%~dp0"
findstr /C:"nodeProcessCommandLine" "dist\web.config" >nul
if %errorLevel% equ 0 (
echo [OK] nodeProcessCommandLine found in web.config
) else (
echo [ERROR] nodeProcessCommandLine NOT in web.config!
)
echo.
echo ========================================
echo SUMMARY
echo ========================================
echo.
echo If all checks pass, the issue might be:
echo 1. IIS worker process can't access Node.js
echo 2. Permissions issue
echo 3. iisnode configuration not being read
echo.
echo HONEST ANSWER: Error 0x00000002 usually means
echo iisnode can't execute Node.js. This could be:
echo - PATH not set for IIS worker process
echo - Node.js path wrong
echo - Permissions issue
echo - iisnode not properly configured
echo.
pause