New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v4] Expo V3 Router and Nativewind. Styles are not loading. #886
Comments
I am having the same Problem. |
Same issue here, I don't really want to change my project layout so it would be good to know if there is a solution |
I fixed this by running: I put this command in my package json as the default start script The -c / --clear flag clears the expo cache when starting the dev server , not sure if there's a better workaround but this worked for me |
tried this first but didnt work for me... |
Same here. I need to make change in any component, save, and then press |
Tried @BAMFuuuCrab 's solution and it worked for me! (using expo-router btw) Also some recommendations;
|
Afterwards, I tried some other methods and found another solution that works with the src directory (it worked for me). Make sure your tailwind.config.js settings are correct, ensuring the content configuration is accurate. You can try using my configuration.
Ensure global.css is correctly imported at the root. In metro.config.js, also make sure the path to global.css is correctly configured. After confirming there are no mistakes in the above, slightly change the way you start the project. Since this issue only occurs for me on the iOS platform, first use
If you don't have an iOS folder, Expo will first perform a prebuild, then build and install onto the iOS device. After this step, you can stop the development server with Control + C. Start the development server with
The Expo documentation explains the --clear parameter as follows: Restart the development server and clear the JavaScript transformation caches. so, that it, i hope the above can be helpful to you guys
|
I needed to clear my expo cache once. All subsequent tries worked fine. I presume some config is cached on expo init, and it's not aware of nativewind after installing, until reset 🤷 Not entirely sure though. Would be cool to hear from maintainers on this one |
Still an issue for me |
This was the issue for me. |
Describe the bug
A clear and concise description of what the bug is.
Initial load of application in Expo router is not loading styles.
but once you hot reload it after just saving
tailwind.config.js
without any changes.it loads all the styling.
To Reproduce
Steps to reproduce the behavior:
tailwind.config.js
and refresh the app it will load all the styles.Expected behavior
It should have load style on initial load of the application.
Video
nativewind-expo-rouert-bug.mp4
The text was updated successfully, but these errors were encountered: