Automated summary
This skill diagnoses and fixes build errors in a Turborepo/pnpm monorepo, with targeted procedures for TypeScript, Vite, pnpm workspaces, and ESLint.
Strengths
- Provides a step-by-step diagnostic process from reading build logs to rebuilding a specific package.
- Collects concrete fixes for common TypeScript, Turborepo, Vite, pnpm, and ESLint build failures.
- Includes quick commands for clearing caches, forcing rebuilds, and inspecting the dependency graph.
Limitations
- Examples are tightly coupled to the PF project's stack and @pf-dev package names.
- Some workarounds are temporary or destructive, such as --no-lint, eslint-disable, or deleting node_modules.
- The skill focuses on build errors, not runtime bugs or deployment failures.
Use it when a pnpm/Turborepo build fails due to TypeScript, Vite, pnpm workspace, ESLint, or cache errors.
Do not use it for runtime bugs, deployment failures, or projects that do not use pnpm and Turborepo.
Security analysis
CautionThe skill is a build-troubleshooting guide whose concrete actions are package-manager and cache commands. The only risky elements are `rm -rf` scoped to node_modules/turbo cache and registry installs, both standard and recoverable, so this is 'caution' rather than 'risky'. No data exfiltration, secrets access, or obfuscation is present.
- •Instructions direct the agent to run shell commands via Bash, including destructive cleanup: `rm -rf node_modules/.cache/turbo` and `rm -rf node_modules` (the latter chained with `pnpm install && pnpm build` as a 'last resort' full reset).
- •`pnpm install` triggers network/registry fetches and can install or update dependencies (supply-chain surface).
- •All commands are scoped to the project working directory; no absolute-path deletions, no `curl | sh`, no credential/token access, no obfuscated payloads, no attempts to disable agent safety.
Examples
pnpm build에서 TS2307: Cannot find module '@pf-dev/ui' 에러가 나요. 원인 확인하고 해결해줘.turbo build가 'could not find output "dist" in cache'로 실패합니다. 캐시 정리하고 다시 빌드해줘.pnpm-workspace.yaml catalog 관련 ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER 에러를 고쳐줘.name: pf-build-fix description: Turborepo 빌드 에러 해결. "빌드 에러", "build 실패", "turbo 에러" 요청 시 사용. allowed-tools: Read, Bash, Glob, Grep
PF 빌드 에러 해결 전문가
$ARGUMENTS 빌드 에러를 분석하고 해결합니다.
진단 프로세스
1단계: 에러 유형 파악
# 전체 빌드 로그 확인
pnpm build 2>&1 | head -100
# 특정 패키지만 빌드
pnpm --filter @pf-dev/ui build
2단계: 일반적인 에러 패턴
🔴 TypeScript 에러
타입 불일치
error TS2322: Type 'string' is not assignable to type 'number'
해결:
- 해당 파일의 타입 정의 확인
- Props 인터페이스와 실제 사용 비교
- tsconfig.json의 strict 설정 확인
모듈 찾을 수 없음
error TS2307: Cannot find module '@pf-dev/ui' or its corresponding type declarations
해결:
# 1. 의존성 재설치
pnpm install
# 2. 패키지 빌드 순서 확인
pnpm --filter @pf-dev/ui build
# 3. tsconfig의 paths 확인
cat tsconfig.json | grep -A 10 "paths"
noUncheckedIndexedAccess 에러
error TS18048: 'items[0]' is possibly 'undefined'
해결:
// ❌ 에러
const first = items[0];
first.name;
// ✅ 해결
const first = items[0];
if (first) {
first.name;
}
// 또는
const first = items.at(0);
🔴 Turborepo 에러
캐시 문제
error: could not find output "dist" in cache
해결:
# 캐시 삭제
pnpm clean
# 또는
rm -rf node_modules/.cache/turbo
의존성 순서 문제
@pf-dev/ui:build: error: Cannot find module '@pf-dev/api'
해결:
// turbo.json
{
"tasks": {
"build": {
"dependsOn": ["^build"] // 의존 패키지 먼저 빌드
}
}
}
순환 의존성
Circular dependency detected
해결:
pnpm why 패키지명으로 의존성 트리 확인- 공통 타입을 별도 패키지로 분리
- 인터페이스와 구현 분리
🔴 Vite 에러
환경변수 누락
Uncaught ReferenceError: process is not defined
해결:
// vite.config.ts
export default defineConfig({
define: {
'process.env': {}
}
});
외부 패키지 번들링 문제
[vite]: Rollup failed to resolve import "cesium"
해결:
// vite.config.ts
export default defineConfig({
optimizeDeps: {
include: ['cesium']
},
build: {
commonjsOptions: {
include: [/cesium/, /node_modules/]
}
}
});
🔴 pnpm/workspace 에러
catalog 버전 불일치
ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER catalog: is not supported
해결:
# pnpm-workspace.yaml에 catalog 정의 확인
catalog:
react: ^19.2.0
피어 의존성 경고
WARN Issues with peer dependencies found
해결:
# .npmrc에 추가
auto-install-peers=true
strict-peer-dependencies=false
🔴 ESLint 에러
빌드 시 린트 에러로 실패
error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
해결 옵션:
# 1. 린트 무시하고 빌드 (임시)
pnpm build --no-lint
# 2. 해당 파일 수정
# 3. eslint-disable 주석 (최후의 수단)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
빠른 해결 명령어
# 전체 초기화 (최후의 수단)
pnpm clean && rm -rf node_modules && pnpm install && pnpm build
# 특정 패키지만 재빌드
pnpm --filter @pf-dev/ui build --force
# 의존성 그래프 확인
pnpm turbo run build --graph
# 캐시 없이 빌드
pnpm turbo run build --force
에러 보고 시 포함할 정보
- 전체 에러 메시지
- 어떤 패키지/앱에서 발생했는지
- 최근 변경사항
pnpm -v,node -v버전
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/turborepo-build-error-resolution-expert-mmh8qqzd/download' --output '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md.part' && mv '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md.part' '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Bash, Glob, Grep
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md' && test -s '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pf-build-fix' && cp -R '.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd' '.claude/skills/pf-build-fix'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd'openskills read 'turborepo-build-error-resolution-expert-mmh8qqzd'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/turborepo-build-error-resolution-expert-mmh8qqzd/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.