-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
53 lines (48 loc) · 1.38 KB
/
install.bat
File metadata and controls
53 lines (48 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
setlocal
set "SCRIPT_DIR=%~dp0"
set "PORTABLE_NODE=%SCRIPT_DIR%dist\nodejs"
where npm >nul 2>&1
if %errorlevel% neq 0 (
if exist "%PORTABLE_NODE%\node.exe" (
if exist "%PORTABLE_NODE%\node_modules\npm\bin\npm-cli.js" (
set "PATH=%PORTABLE_NODE%;%PATH%"
echo Using portable Node.js from dist\nodejs
) else (
echo ERROR: dist\nodejs is incomplete - missing node_modules\npm
echo Run: .\setup-portable-nodejs.ps1 to download complete Node.js
echo Or install Node.js from nodejs.org
exit /b 1
)
) else (
echo ERROR: npm not found. Install Node.js from nodejs.org or run .\setup-portable-nodejs.ps1
exit /b 1
)
)
echo Installing dependencies...
call npm install
if %errorlevel% neq 0 (
echo Error installing root dependencies
exit /b %errorlevel%
)
echo Installing client dependencies...
cd client
call npm install
if %errorlevel% neq 0 (
echo Error installing client dependencies
exit /b %errorlevel%
)
echo.
echo Installing react-router-dom...
call npm install react-router-dom
if %errorlevel% neq 0 (
echo Warning: Failed to install react-router-dom
echo You may need to install it manually: cd client && npm install react-router-dom
)
cd ..
echo.
echo Installation complete!
echo.
echo Next steps:
echo 1. Run: .\setup-db.bat
echo 2. Run: .\start.bat