native-build-errors

A reference for diagnosing failed iOS and Android builds in React Native, including CocoaPods, Gradle, Xcode, Kotlin, Java, code generation, and cache problems.

In plain words
What is it for?
Use it for pod installation failures, Gradle and linker errors, Xcode errors, incompatible tool versions, and native build output.
Why use it?
It explains how to locate the first meaningful build error instead of treating the final “build failed” message as the cause.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/anilburcu/claude-code-react-native/native-build-errors
Any agent
npx skills add AnilBurcu/claude-code-react-native --skill native-build-errors
Clone the repo
git clone --depth 1 https://github.com/AnilBurcu/claude-code-react-native

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,407 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00067 $0.01407
Opus 5 $0.00034 $0.00704
Sonnet 5 $0.00013 $0.00281
Haiku 4.5 $0.00007 $0.00141

Measured 2d ago against content hash 3dbcb6b1c444, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

native-build-errors scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `No such module 'X'`: the pod exists but the workspace was not used, or DerivedData holds a stale module map. Confirm you opened `.xcworkspace`, then `rm -rf ~/Library/Developer/Xcode/DerivedData`.
plugins/rn/skills/native-build-errors/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Native build failure triage

The one rule that matters

Native build logs bury the real error under hundreds of lines of noise. Always find the FIRST real error, not the last line. The last line is usually a generic "build failed" wrapper around the actual cause.

  • Android: search the log for FAILURE: and Caused by:. The deepest Caused by: is the real one. Also look for > Task :app:... FAILED to identify which task died.
  • iOS: search for error: (lowercase, with colon). Ignore warning:. When xcodebuild output is huge, the failing step name right above the first error: tells you which pod or script phase broke.

Never start by nuking caches. Read the error first. Cache-nuking is step 8, not step 1.

iOS playbook

pod install fails

  • None of your spec sources contain a spec satisfying the dependency: the lockfile and Podfile disagree, usually after a branch switch or dependency bump. Start gentle: cd ios && pod install --repo-update. Only if that fails, remove Pods/ and Podfile.lock and reinstall; in an RN project the lockfile regenerates from package.json, which is why this is acceptable here and not for JS lockfiles (see the last-resort section).
  • Ruby/ffi errors on Apple Silicon: the project's Ruby is too old or gems were built for the wrong arch. Prefer the version from .ruby-version. bundle install && bundle exec pod install beats global pods.
  • could not find compatible versions for pod X: two libraries pin conflicting versions of a shared native dependency (common with Firebase and GoogleUtilities). Check which two, then upgrade the older library instead of pinning in the Podfile if possible.

Xcode build fails after pods succeeded

  • No such module 'X': the pod exists but the workspace was not used, or DerivedData holds a stale module map. Confirm you opened .xcworkspace, then rm -rf ~/Library/Developer/Xcode/DerivedData.
  • Duplicate symbols or use_frameworks! conflicts: static and dynamic linkage mixing, classic with Firebase. In Expo projects set useFrameworks: "static" via expo-build-properties instead of hand-editing the Podfile.
  • Signing errors on device builds: set the development team in Xcode once, or use EAS credentials. Do not commit personal team IDs into the project file of a shared repo.
  • A script phase fails (Hermes, sourcemaps, [CP-User]): open the phase's own log section. These phases inherit PATH from Xcode, not your shell, so tools installed via nvm or asdf may not resolve. Hardcoding node paths in .xcode.env.local fixes most of it.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 75 lines · 67 tokens per session scan C 3dbcb6b1c444

Subscribe to this mod's changes

native-build-errors is a skill published in the GitHub repository AnilBurcu/claude-code-react-native (3 stars, last pushed 1mo ago), licensed MIT. It adds 67 tokens to every session and 1,407 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

expo-56

Authoritative, version-pinned reference for Expo SDK 56 and SDK 57 — both postdate your training, so defer to this skill over memory for anything Expo. SDK 57 is the current release (2026-07-08, React Native 0.86); SDK 56 is the previous, still-supported release (React Native 0.85). Use it whenever the user is…

mahdi-salmanzade/expo56-skill · 391 tokens

optimising-expo-react-native-performance

Diagnose, improve, and prevent performance regressions in Expo-based React Native apps using release-build profiling, KPI budgets, and targeted fixes across startup, rendering, lists, images, memory, and networking.

tristanmanchester/agent-skills · 49 tokens

uniwind

Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building, or debugging components in a React Native project that uses Uniwind classNames. Covers setup, Metro config, global.css, theming, className props, accent- color props, platform/data/state/responsive variants, CSS variables, custom utilities…

uni-stack/uniwind · 130 tokens

setup-react-native-storybook

Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project, configuring metro.config.js with withStorybook, creating .rnstorybook configuration files, setting up Storybook routes in Expo Router, configuring getStorybookUI, or adding the StorybookPlugin to a…

storybookjs/react-native · 102 tokens

upgrading-react-native-storybook

Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading @storybook/react-native projects from 5.3.x to 6.5.x, 6.5.x to 7.6.x, 7.6.x to 8.3.x, 8.x to 9.x, or 9.x to 10.x. Detect the currently installed Storybook version, choose only the next migration step, update…

storybookjs/react-native · 151 tokens

migrate-nativewind-to-uniwind

Migrate a React Native project from NativeWind to Uniwind. Use when the user wants to replace NativeWind with Uniwind, upgrade from NativeWind, switch to Uniwind, or mentions NativeWind-to-Uniwind migration. Handles package removal, config migration, Tailwind 4 upgrade, cssInterop removal, theme conversion, and all…

uni-stack/uniwind · 82 tokens