Prompt file imported from mchestr/plex-manager (
.claude/commands/build.md). Fill in{{arguments}}before use. Copyright stays with the author.
Build Runner
Build the Next.js application for production and identify any build errors.
Usage
/build- Run production build/build analyze- Build with bundle analysis/build check- Quick type-check without full build
Arguments
{{arguments}} can specify:
analyze- Run build with bundle analysis (if configured)check- Run type checking only (faster than full build)
Instructions
- Parse arguments to determine build mode
- Execute the appropriate command:
- No args:
npm run build check:npx tsc --noEmitanalyze:npm run build(with ANALYZE=true if configured)
- No args:
- Monitor build process and report progress
- If build fails:
- Identify the specific error (type errors, import errors, etc.)
- Show the file and line where error occurred
- Offer to fix the issue
- If build succeeds:
- Report build time
- Show bundle sizes (if available)
- Note any warnings that should be addressed
Common Issues to Check
- TypeScript type errors
- Missing dependencies
- Import path issues
- Environment variable issues
- Build optimization warnings
Error Handling
- Parse build errors to identify root cause
- Check for common issues (missing modules, type errors, etc.)
- Offer specific fixes based on error type
- Suggest running
npm installif dependency issues detected
