nativewind icon indicating copy to clipboard operation
nativewind copied to clipboard

I can't use it with my app ?

Open hakimov-dev opened this issue 2 years ago • 6 comments

Describe the bug I can't use it with my app ? I've download and added configures as the docs but tailwind not working on my project?

To Reproduce Steps to reproduce the behavior:

  1. Configured as a docs.
  2. I've added className to <Text />
  3. Restarted my app but nothing changed?

Expected behavior I expected my tailwind classes working fluently and nothing.

Screenshots Application: image The component: image babel.config.js: image Tailwind config js: image

Additional context "expo": "^48.0.7", "react-native": "0.71.3", The docs: https://www.nativewind.dev/quick-starts/expo

hakimov-dev avatar Jul 10 '23 17:07 hakimov-dev

More on this: running npx tailwind -o output.css produces the CSS file with the correct classes - they're just not being rendered in-app.

haydenbleasel avatar Jul 11 '23 04:07 haydenbleasel

image <custom-folder> must be the folder containing all your files such as src folder ^^ My case, it will be content: ['./App.{js,jsx,ts,tsx}', './src/**/*.{js,jsx,ts,tsx}']

pynhpo avatar Jul 14 '23 13:07 pynhpo

@pynhpo Not sure about the OP but I was running this in a sandbox that only had a single App.tsx file, which is included in the content array above, and the issue still occured.

haydenbleasel avatar Jul 14 '23 14:07 haydenbleasel

same problem +1 "expo": "~48.0.18" with expo-router

PR0F1L3R1 avatar Jul 15 '23 00:07 PR0F1L3R1

Try to add this in your main _layout file. I am using this in all my new projects with expo 49:

import { NativeWindStyleSheet } from "nativewind";

NativeWindStyleSheet.setOutput({
  default: "native",
});

ebulku avatar Aug 11 '23 21:08 ebulku

git the same problem with: "nativewind": "^2.0.11", "react": "18.2.0", "expo": "~50.0.7", "expo-router": "~3.4.7",

ohjah avatar Feb 19 '24 11:02 ohjah

We are closing all pre-v4.1 issues now that v4.1 is released. If the problem is still happening with the latest v4.1, please open a new issue and reference this one in the description.

danstepanov avatar Sep 02 '24 23:09 danstepanov