claude-code-framework/essential/skills/emergency/build-error-fixer/SKILL.md
Fixes common build and compilation errors including missing dependencies, syntax errors, webpack config issues, and module resolution. Use when user sees "build failed", "compilation error", "Module not found", "Cannot find module", "webpack error", or build-related error messages.
npx skillsauth add tokenized2027/claude-initilization-v7 build-error-fixerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Quickly diagnoses and fixes build/compilation errors.
Error:
Module not found: Can't resolve 'react'
Cannot find module 'express'
Fix:
# Check if it's in package.json
cat package.json | grep react
# If missing, install it
npm install react
# Or for dev dependencies
npm install --save-dev typescript
Error:
error Unsupported Engine
The engine "node" is incompatible with this module
Fix:
# Check required version
cat package.json | grep engines
# Check your version
node --version
# Install correct version with nvm
nvm install 20
nvm use 20
Error:
TS2307: Cannot find module './utils' or its corresponding type declarations
TS2322: Type 'string' is not assignable to type 'number'
Fix:
# Regenerate types
npm run build
# Or clear cache and rebuild
rm -rf node_modules .next
npm install
npm run build
For type errors:
// @ts-ignore if you're certain it's fineError:
Module parse failed: Unexpected token
Invalid options object. Webpack has been initialized using a configuration object
Fix:
# Clear Next.js cache
rm -rf .next
# Rebuild
npm run build
# If still broken, check next.config.js for syntax errors
Error:
error - Error: NEXT_PUBLIC_API_URL is not defined
Fix:
# Check .env.local exists
ls -la .env.local
# Verify variable is defined
cat .env.local | grep API_URL
# Add if missing
echo "NEXT_PUBLIC_API_URL=http://localhost:3000" >> .env.local
# Restart dev server
npm run dev
Error:
npm ERR! code EINTEGRITY
npm ERR! Verification failed while extracting
Fix:
# Delete lock file and node_modules
rm package-lock.json
rm -rf node_modules
# Reinstall
npm install
| Error Type | Quick Fix |
|------------|-----------|
| Module not found | npm install [package] |
| Type errors | Clear .next, rebuild |
| Wrong Node version | nvm install [version] |
| Lock file conflict | Delete package-lock.json, reinstall |
| Env var missing | Add to .env.local, restart |
| Build cache issue | rm -rf .next && npm run build |
✅ Use for: Build errors, compilation errors, missing modules ❌ Don't use for: Runtime errors, logic bugs, production deployment
development
Methodical debugging using reproducible steps, instrumentation, and root-cause analysis. Use when something is broken and you don't know why. Triggers on "bug", "broken", "not working", "error", "fails intermittently", "regression", "unexpected behavior".
development
Optimize prompts for Claude Code agents, API calls, and multi-agent orchestration. Use when writing system prompts, agent instructions, or refining LLM interactions. Triggers on "improve prompt", "write a prompt", "agent instructions", "system prompt", "prompt not working", "LLM output quality".
tools
Structured ideation and design review before any creative or constructive work. Use before building features, components, architecture, dashboards, or automation workflows. Triggers on "plan this", "design this", "brainstorm", "think through", "what should we build", "how should I approach".
testing
Generates test files for components and functions with setup, basic tests, and mocks. Use when user says "add tests", "create test", "test this component", or mentions testing.