2026-05-13: Fix tauri-build.sh — nest: command not found
Problem
Section titled “Problem”Running npm run tauri:prod (or ./scripts/tauri-build.sh directly) fails with:
▸ Building backend …sh: nest: command not foundRoot Cause
Section titled “Root Cause”scripts/tauri-build.sh installs backend dependencies with --omit=dev:
npm ci --omit=dev 2>/dev/null || npm install --omit=dev@nestjs/cli — which provides the nest binary used by npm run build → nest build — is in devDependencies. Skipping dev deps means nest is never installed.
scripts/tauri-dev.sh is unaffected: it uses a full npm ci (no --omit=dev).
Database Routing (not affected)
Section titled “Database Routing (not affected)”npm run tauri:prod produces a release build. DB selection in lib.rs:
fn is_dev_build() -> bool { cfg!(debug_assertions) // false in release builds}// → db_file = "strata.db"// → ~/Library/Application Support/Strata/strata.db (production DB)The fix does not affect this routing. Debug builds (tauri dev) continue using strata-dev.db.
Remove --omit=dev from the backend install step in scripts/tauri-build.sh:
# Before:npm ci --omit=dev 2>/dev/null || npm install --omit=dev
# After:npm ci 2>/dev/null || npm installThe .app loads from the host repo clone (not redistributable — see bundle-node-runtime.md), so having dev deps in backend/node_modules is acceptable. Dev tools are needed to compile TypeScript; they are not shipped inside the .app bundle.
Files Changed
Section titled “Files Changed”| File | Change |
|---|---|
scripts/tauri-build.sh | Removed --omit=dev from backend npm ci |
Execution Summary
Section titled “Execution Summary”Commit: b1dace7
Actual changes
Section titled “Actual changes”scripts/tauri-build.shline 21: changednpm ci --omit=dev 2>/dev/null || npm install --omit=dev→npm ci 2>/dev/null || npm install
Deviations from plan
Section titled “Deviations from plan”None.
Test results
Section titled “Test results”| Gate | Result |
|---|---|
| Backend unit | ⏭ not affected |
| Backend e2e | ⏭ not affected |
| Frontend unit | ⏭ not affected |
| Frontend e2e | ⏭ not affected |
| Infra (tauri-build.sh) | ✅ backend builds without nest: command not found |
Key discoveries
Section titled “Key discoveries”None.