---
title: "建置與修復"
description: "增量修復 TypeScript 和建置錯誤："
type: skill
canonical_url: https://claudary.paisolsolutions.com/skills/build-fix-7
source: "Claudary"
difficulty: intermediate
author: "Claude Code Knowledge Pack"
date: 2026-07-10T11:08:36.279Z
license: CC-BY-4.0
attribution: "建置與修復 — Claudary (https://claudary.paisolsolutions.com/skills/build-fix-7)"
---

# 建置與修復
增量修復 TypeScript 和建置錯誤：

## Overview

# 建置與修復

增量修復 TypeScript 和建置錯誤：

1. 執行建置：npm run build 或 pnpm build

2. 解析錯誤輸出：
   - 依檔案分組
   - 依嚴重性排序

3. 對每個錯誤：
   - 顯示錯誤上下文（前後 5 行）
   - 解釋問題
   - 提出修復方案
   - 套用修復
   - 重新執行建置
   - 驗證錯誤已解決

4. 停止條件：
   - 修復引入新錯誤
   - 3 次嘗試後同樣錯誤仍存在
   - 使用者要求暫停

5. 顯示摘要：
   - 已修復的錯誤
   - 剩餘的錯誤
   - 新引入的錯誤

為了安全，一次修復一個錯誤！

---

Source: [Claudary](https://claudary.paisolsolutions.com/skills/build-fix-7) · https://claudary.paisolsolutions.com
