nodejs-dependencies-install.bat 613 B

123456789101112131415161718192021222324252627282930
  1. @echo off
  2. chcp 65001 >nul
  3. title Install Node.js Dependencies
  4. cd /d "%~dp0\..\..\.."
  5. set "NODE_DIR=%~dp0..\..\node"
  6. set "PATH=%NODE_DIR%;%NODE_DIR%\node_modules\.bin;%PATH%"
  7. if not exist "%NODE_DIR%\node.exe" (
  8. echo [ERROR] nodejs\node\node.exe not found.
  9. echo Run nodejs\bootstrap-npm.js first if node_modules is missing.
  10. echo.
  11. pause
  12. exit /b 1
  13. )
  14. "%NODE_DIR%\node.exe" "%~dp0nodejs-dependencies-install.js" %*
  15. if errorlevel 1 (
  16. echo.
  17. echo [ERROR] Install failed
  18. echo.
  19. pause
  20. exit /b 1
  21. ) else (
  22. echo.
  23. echo [OK] Install completed
  24. echo.
  25. pause
  26. exit /b 0
  27. )