Files
affaan-m--everything-claude…/docs/pt-BR/commands/build-fix.md
T
wehub-resource-sync d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:55 +08:00

2.5 KiB

Build e Correção

Corrija erros de build e de tipos incrementalmente com mudanças mínimas e seguras.

Passo 1: Detectar Sistema de Build

Identifique a ferramenta de build do projeto e execute o build:

Indicator Build Command
package.json with build script npm run build or pnpm build
tsconfig.json (TypeScript only) npx tsc --noEmit
Cargo.toml cargo build 2>&1
pom.xml mvn compile
build.gradle ./gradlew compileJava
go.mod go build ./...
pyproject.toml python -m py_compile or mypy .

Passo 2: Parsear e Agrupar Erros

  1. Execute o comando de build e capture o stderr
  2. Agrupe erros por caminho de arquivo
  3. Ordene por ordem de dependência (corrija imports/tipos antes de erros de lógica)
  4. Conte o total de erros para acompanhamento de progresso

Passo 3: Loop de Correção (Um Erro por Vez)

Para cada erro:

  1. Leia o arquivo — Use a ferramenta Read para ver o contexto do erro (10 linhas ao redor do erro)
  2. Diagnostique — Identifique a causa raiz (import ausente, tipo errado, erro de sintaxe)
  3. Corrija minimamente — Use a ferramenta Edit para a menor mudança que resolve o erro
  4. Rode o build novamente — Verifique que o erro sumiu e que nenhum novo erro foi introduzido
  5. Vá para o próximo — Continue com os erros restantes

Passo 4: Guardrails

Pare e pergunte ao usuário se:

  • Uma correção introduz mais erros do que resolve
  • O mesmo erro persiste após 3 tentativas (provavelmente há um problema mais profundo)
  • A correção exige mudanças arquiteturais (não apenas correção de build)
  • Os erros de build vêm de dependências ausentes (precisa de npm install, cargo add, etc.)

Passo 5: Resumo

Mostre resultados:

  • Erros corrigidos (com caminhos de arquivos)
  • Erros restantes (se houver)
  • Novos erros introduzidos (deve ser zero)
  • Próximos passos sugeridos para problemas não resolvidos

Estratégias de Recuperação

Situation Action
Missing module/import Check if package is installed; suggest install command
Type mismatch Read both type definitions; fix the narrower type
Circular dependency Identify cycle with import graph; suggest extraction
Version conflict Check package.json / Cargo.toml for version constraints
Build tool misconfiguration Read config file; compare with working defaults

Corrija um erro por vez por segurança. Prefira diffs mínimos em vez de refatoração.