#7824: fix(ui): remove --prod install flag that causes vite not found error
scripts
stale
Cluster:
UI Improvements and Fixes
The build action was using pnpm install --prod with NODE_ENV=production, which skips devDependencies. This caused the build to fail with 'vite not found' or silent exit code 1 errors.
The fix removes the --prod flag and NODE_ENV=production override, ensuring all dependencies (including devDependencies needed for the build) are installed.
Fixes #7104
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the UI helper script (`scripts/ui.js`) to always install full dependencies before running `build`/`test`, removing the prior `pnpm install --prod` + `NODE_ENV=production` behavior that skipped `devDependencies` and could lead to missing build tools like `vite`. The change aligns the install step with the script’s existing `depsInstalled()` check (which already requires `vite`/`vitest` for build/test) so CI and local builds don’t fail due to omitted dev tooling.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk; it simplifies dependency installation to avoid missing build tooling.
- Change is localized to `scripts/ui.js` and replaces conditional prod-only installs with a standard install, matching the script’s existing dependency checks. No behavior changes beyond ensuring devDependencies are installed when running build/test/dev after a missing-deps state.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#9628: fix: resolve tsconfig rootDir errors by separating UI config (AI-as...
by KGBos · 2026-02-05
79.3%
#3973: fix: enhance npm package integrity checks and include critical files
by YeSuX · 2026-01-29
78.6%
#21089: fix(ui): externalize all Node builtins in Vite build
by lemoz · 2026-02-19
77.5%
#8988: fix: resolve security vulnerabilities in dependencies
by fotorpics · 2026-02-04
76.3%
#7023: feat(ui): inject build SHA fingerprint into index.html
by sergi039 · 2026-02-02
74.8%
#8073: fix(plugins): add --ignore-scripts to npm install
by yubrew · 2026-02-03
73.7%
#4243: fix: resolve Node.js punycode deprecation warning
by dylanneve1 · 2026-01-29
73.6%
#11979: fix: Change rootDir to project root to allow UI compilation
by fastroc · 2026-02-08
73.6%
#3978: refactor: changing nested ternaries to a switch statement
by watercubz · 2026-01-29
73.4%
#11951: Prepending Windows Node to PATH didn’t help
by tranhoangtu-it · 2026-02-08
73.2%