FIX: đã sửa build_windows.bat bước 4
This commit is contained in:
+10
-3
@@ -43,17 +43,24 @@ pip install --no-deps "pedalboard>=0.8.0"
|
|||||||
echo [4/6] Precompile JS...
|
echo [4/6] Precompile JS...
|
||||||
npm install --no-audit --no-fund
|
npm install --no-audit --no-fund
|
||||||
if errorlevel 1 (
|
if errorlevel 1 (
|
||||||
echo npm install that bai - kiem tra internet / package.json
|
echo FAIL: npm install that bai - kiem tra internet / package.json
|
||||||
pause
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
echo - npm OK, kiem tra babel...
|
||||||
if not exist "node_modules\@babel\cli\bin\babel.js" (
|
if not exist "node_modules\@babel\cli\bin\babel.js" (
|
||||||
echo THIEU @babel/cli trong node_modules - npm install khong hoan tat
|
echo FAIL: thieu node_modules\@babel\cli\bin\babel.js - npm install khong hoan tat
|
||||||
pause
|
pause
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
echo - chay Babel...
|
||||||
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
|
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
|
if errorlevel 1 (
|
||||||
|
echo FAIL: Babel precompile that bai - xem loi phia tren
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo - Babel OK
|
||||||
|
|
||||||
echo [5/6] Build daw_engine.exe...
|
echo [5/6] Build daw_engine.exe...
|
||||||
pyinstaller engine.spec --clean --noconfirm
|
pyinstaller engine.spec --clean --noconfirm
|
||||||
|
|||||||
@@ -2990,3 +2990,9 @@
|
|||||||
- **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).
|
- **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.
|
- **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.
|
- **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.
|
||||||
|
|
||||||
|
### [2026-08-08 09:00] Task: FIX build_windows.bat — Babel fail dừng im (exit /b 1 không message)
|
||||||
|
- **Lỗi:** [4/6] npm OK ("up to date") — nhưng node babel fail → `if errorlevel 1 exit /b 1` — THOÁT im lặng về prompt.
|
||||||
|
- **FIX (build_windows.bat bước 4):** in từng bước (npm OK → kiem tra babel → chay Babel) + MỌI điểm fail có `echo FAIL: ... + pause` (không exit im).
|
||||||
|
- **Các file ảnh hưởng:** build_windows.bat, wiki.md.
|
||||||
|
- **Ghi chú/Test:** chạy lại — nếu Babel fail sẽ THẤY lỗi thật (thường: node_modules thiếu @babel/cli hoặc lỗi syntax source). WORKAROUND: nếu chỉ env (không phải syntax) — bản `app.precompiled.js` hiện có vẫn dùng được (đã build sẵn) — có thể comment dòng babel trong script.
|
||||||
|
|||||||
Reference in New Issue
Block a user