Paste an error to match it against the wiki. / 粘贴报错后自动匹配。
Error text / 报错原文
vite: not foundtsc: not foundCannot find module typescript
What it means
The Docker build skipped devDependencies before running the frontend or TypeScript build.
Most common causes
- NODE_ENV=production set before npm ci
- npm ci --omit=dev used in the build stage
- Build tools are incorrectly stored in devDependencies for a single-stage image
- AI-generated Dockerfile copied production patterns too early
Fastest fix
- Install dependencies before setting NODE_ENV=production
- Use a multi-stage build with devDependencies in the builder stage
- Move runtime-only pruning after npm run build
- Verify package-lock.json is committed
Safe fix
- Separate builder and runtime images
- Use npm ci for reproducible builds
- Keep TypeScript/Vite in devDependencies but install them only in builder stage
- Fail builds when lockfile is missing
What not to do
- Do not move all devDependencies into dependencies as a blanket fix
- Do not run npm install without a lockfile in CI
- Do not build production assets inside the runtime-only stage
How to confirm the fix
Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.
node --version npm ci npm run build
Related errors
- Rollup failed to resolve import - Vite / Vercel deployment →
- Environment variables not working in Cloudflare Workers / wrangler →
- You've hit your session limit / weekly limit - Claude Code →
- Prompt is too long - Claude Code context window →
- Not logged in - Please run /login - Claude Code →
- API Error: Repeated 529 Overloaded errors - Claude Code →
Related tools
Sources
Based on common developer troubleshooting patterns and linked EasyTool references.