FIX: đã sửa build_windows.bat

This commit is contained in:
2026-08-08 09:21:55 +07:00
parent 3f35b84535
commit bc759dd99a
2 changed files with 23 additions and 2 deletions
+17 -2
View File
@@ -41,7 +41,17 @@ if errorlevel 1 exit /b 1
pip install --no-deps "pedalboard>=0.8.0"
echo [4/6] Precompile JS...
npm install --no-audit --no-fund >nul 2>nul
npm install --no-audit --no-fund
if errorlevel 1 (
echo npm install that bai - kiem tra internet / package.json
pause
exit /b 1
)
if not exist "node_modules\@babel\cli\bin\babel.js" (
echo THIEU @babel/cli trong node_modules - npm install khong hoan tat
pause
exit /b 1
)
node node_modules/@babel/cli/bin/babel.js app/static/js/app.jsx --config-file ./babel.config.json -o app/static/js/app.precompiled.js
if errorlevel 1 exit /b 1
@@ -52,7 +62,12 @@ if not exist "src-tauri\binaries" mkdir "src-tauri\binaries"
copy /y dist\daw_engine.exe "src-tauri\binaries\daw_engine-x86_64-pc-windows-msvc.exe" >nul
echo [6/6] Build Tauri installer...
npm install -D @tauri-apps/cli@^2 >nul 2>nul
npm install -D @tauri-apps/cli@^2
if errorlevel 1 (
echo npm install tauri-cli that bai
pause
exit /b 1
)
call npx tauri build
echo.
+6
View File
@@ -2984,3 +2984,9 @@
- **FIX:** viết lại batch an toàn: bỏ mọi ngoặc trong echo, dùng `if errorlevel 1 ( ... )` thuần, echo KHÔNG DẤU (tránh codepage), quote `"pedalboard>=0.8.0"` (dấu `>` = redirect trong cmd).
- **Các file ảnh hưởng:** build_windows.bat, wiki.md.
- **Ghi chú/Test:** chạy lại `build_windows.bat` trên Windows — hết lỗi parse; nếu thiếu Rust → tự cài rustup rồi tiếp tục.
### [2026-08-08 08:55] Task: FIX build_windows.bat — dừng im lặng ở [4/6] (npm install nuốt lỗi)
- **Lỗi:** script dừng ở [4/6] Precompile JS không message — `npm install >nul 2>nul` nuốt lỗi → babel thiếu → `exit /b 1` im lặng.
- **FIX (build_windows.bat):** (1) [4/6] — bỏ `>nul 2>nul` (hiện lỗi), check `if errorlevel 1` + check tồn tại `node_modules\@babel\cli\bin\babel.js` với message rõ; (2) [6/6] — tương tự cho `npm install -D @tauri-apps/cli` (bỏ nuốt lỗi + check).
- **Các file ảnh hưởng:** build_windows.bat, wiki.md.
- **Ghi chú/Test:** chạy lại `.\build_windows.bat` — nếu npm install fail sẽ thấy lỗi thật (network/registry) thay vì dừng im.