79668169

Date: 2025-06-16 20:05:54
Score: 0.5
Natty:
Report link

I have been facing the same issue of NativeWind not working in a project initiated without it and Expo SDK 53 for weeks but glad I finally found a way around it.

I think this, https://www.nativewind.dev/docs/guides/troubleshooting, is a great starting point for debugging. First clear the cache using the command "npx expo start --clear" then proceed with the other debugging steps.

When I ran this command, "npx tailwindcss --input <input.css> --output output.css," the output.css file was empty, even while I had my global.css file with the Tailwind import directives. Then I thought, "There must probably be something wrong with the installation." I also tried verifying the NativeWind installation using the guide here, https://www.nativewind.dev/docs/guides/troubleshooting#verifying-nativewind-installation, but it gave an error.

Then, I deleted my node_modules folder and reinstalled the entire package using the command "npm i" and then followed the NativeWind manual setup guide again, following the guide here: https://www.nativewind.dev/docs/getting-started/installation. I previously had Tailwind CSS in the dependency instead of devDependencies.

Also, I updated my tailwind.config.js file correctly to contain the app and component folders.

/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./app/**/*.{js,jsx,ts,tsx}", "./components/**/*.{js,jsx,ts,tsx}"],
presets: [require("nativewind/preset")],
theme: {
extend: {},
},
plugins: [],
}

Following the details carefully in the installation guide should help a lot, and be sure to verify the NativeWind installation, https://www.nativewind.dev/docs/guides/troubleshooting#verifying-nativewind-installation.

`import { verifyInstallation } from "nativewind";

export default function AuthScreen() {
const nativewind = verifyInstallation();
console.log("nativewind: ", nativewind);
// remaining code`

It now logs the below, showing it has been correctly installed and configured

`LOG NativeWind verifyInstallation() found no errors
LOG nativewind: true`

I hope this helps someone.

Reasons:
  • Whitelisted phrase (-1): hope this helps
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same issue
  • Low reputation (0.5):
Posted by: oyerohabib