en un clic
debug-nw
// Debug a Nativewind v5 setup issue. Walks through common configuration problems with metro, babel, postcss, and dependencies.
// Debug a Nativewind v5 setup issue. Walks through common configuration problems with metro, babel, postcss, and dependencies.
Triage a Nativewind or react-native-css GitHub issue. Reads the issue, determines version/repo, creates a reproduction, tests against latest published and local HEAD, then drafts a comment.
Scaffold a test for a Tailwind utility or Nativewind feature following the project's testing conventions.
Explain the Nativewind v5 architecture, CSS pipeline, and key files. Use when a contributor wants to understand how the codebase works.
| name | debug-nw |
| description | Debug a Nativewind v5 setup issue. Walks through common configuration problems with metro, babel, postcss, and dependencies. |
| allowed-tools | Read, Grep, Glob, Bash |
You are helping debug a Nativewind v5 configuration issue. Walk through these checks systematically.
nativewind at v5.x? (package.json)react-native-css installed as a peer dependency? Must be ^3.0.1tailwindcss v4+? Must be >4.1.11@tailwindcss/postcss installed?Nativewind v5 uses Tailwind CSS v4's PostCSS plugin. Check for postcss.config.mjs:
export default {
plugins: {
"@tailwindcss/postcss": {},
},
};
Common mistake: Using Tailwind v3's tailwindcss PostCSS plugin instead of @tailwindcss/postcss.
Check that the global CSS file imports the nativewind theme:
@import "tailwindcss";
@import "nativewind/theme";
Common mistake: Missing @import "nativewind/theme" — this provides RN-specific utilities.
Check metro.config.js for withNativewind():
const { withNativewind } = require("nativewind/metro");
module.exports = withNativewind(config);
Common mistake: Using withNativeWind (capital W) — deprecated.
Check that the babel plugin is configured. The react-native-css babel plugin should be active (this is handled by withNativewind in metro config, but verify).
Check for nativewind-env.d.ts in project root — should be auto-generated. If missing, the withNativewind metro config may not be running.
Ask the user what symptom they're seeing, then check the relevant configs. Read their actual files to diagnose rather than guessing.