Build Command
Run the full build pipeline and fix any errors that occur.
Workflow
- •
Type Check First Run
npx tsc --noEmitto catch type errors before building. If errors found, analyze all errors first before fixing. - •
Run Linter Run
npm run lintto catch linting issues. Auto-fix withnpm run lint -- --fixif possible. - •
Run Build Run
npm run buildfor the production build. - •
Error Resolution Strategy When errors occur:
- •Analyze ALL errors first (don't fix one at a time)
- •Group errors by type/cause
- •Fix root causes, not symptoms
- •Re-run tsc/build after fixes to verify
- •
Success Verification After all fixes:
- •Run final
npm run buildto confirm - •Report success with any warnings
- •Run final
Error Prioritization
- •TypeScript errors - Fix these first, they often cause build failures
- •Import/module errors - Check for missing exports or circular deps
- •React/JSX errors - Component prop issues, hook rules
- •Build errors - Webpack/Next.js specific issues
Output Format
code
[1/4] Type checking... ✓ (or ✗ with error count) [2/4] Linting... ✓ (or ✗ with issue count) [3/4] Building... ✓ (or ✗ with error details) [4/4] Verification... ✓ Build successful!
Never
- •Don't suppress TypeScript errors with
// @ts-ignore - •Don't use
anytype to bypass errors - •Don't delete code just to make build pass
- •Don't skip the final verification step