24 lines
749 B
Batchfile
24 lines
749 B
Batchfile
@echo off
|
|
setlocal
|
|
chcp 65001 >nul
|
|
cd /d "%~dp0"
|
|
set "RECEIPT_DEV_NODE=%USERPROFILE%\.cache\codex-runtimes\codex-primary-runtime\dependencies\node\bin\node.exe"
|
|
if not exist "%RECEIPT_DEV_NODE%" set "RECEIPT_DEV_NODE=node"
|
|
"%RECEIPT_DEV_NODE%" -e "const [major,minor]=process.versions.node.split('.').map(Number);process.exit(major>22||(major===22&&minor>=13)?0:1)" >nul 2>nul
|
|
if errorlevel 1 (
|
|
echo Node.js 24 LTS is required. Please install it and try again.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
if not exist "node_modules\vite\package.json" (
|
|
echo Project dependencies are missing. Please run npm install first.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
"%RECEIPT_DEV_NODE%" scripts\dev.mjs %*
|
|
if errorlevel 1 (
|
|
echo Startup failed. See the error message above.
|
|
pause
|
|
exit /b 1
|
|
)
|