Open Enrique-Ambrocio opened 3 weeks ago
Could you run npx expo start --clear
and try again?
Hey! Ran the command, and got the following: Warning: Failed prop type: Invalid prop color supplied to Text: hsla(240) Valid color formats are:
- '#f0fc' (#rgba)
- '#ff00ff' (#rrggbb)
- '#ff00ff00' (#rrggbbaa)
- 'rgb(255, 255, 255)'
- 'rgba(255, 255, 255, 1.0)'
- 'hsl(360, 100%, 100%)'
- 'hsla(360, 100%, 100%, 1.0)'
- 'transparent'
- 'red'
- 0xff00ff00 (0xrrggbbaa)
Bad object: {
"fontSize": 14,
"lineHeight": 21,
"color": "hsla(240)",
"fontWeight": "500"
}```
I reproduced the error by:
npx create-expo-app@latest
command to create a starter expo router template.npx expo run:ios
Still don't get styles completely applied.
I reproduced the error by:
- Running the
npx create-expo-app@latest
command to create a starter expo router template.- Creating a development build running the command:
npx expo run:ios
- Installing and configuring NativeWind.
- Setting up react-native-resuables per docs
- Import components and use them
Still don't get styles completely applied.
Could you re-build your app? Maybe it should work.
Still unfortunately doesn't work.
Try to update Nativewind 4.0.36, I think it will be solved. I had a similar issue with css styling and it was due to Nativewind bugs. After updating to 4.0.36, the problems disappeared.
Try to update Nativewind 4.0.36, I think it will be solved. I had a similar issue with css styling and it was due to Nativewind bugs. After updating to 4.0.36, the problems disappeared.
Thanks a lot for the reply! Looks like I am no longer receiving that error, but some styles are still not applied as shown below. This is the dialogue component.
@Enrique-Ambrocio This looks like a NativeWind caching issue. Try using npx expo start --clear
again.
@Enrique-Ambrocio Please provide a minimal reproduction repo
@Enrique-Ambrocio Please provide a minimal reproduction repo
Tried reproducing the error multiple times using a single application, and everything worked just fine. Thinking it might be some configuration with my mono repo because styles are not applied completely (even after clearing the cache and rebuilding the styles). Mind if I share it with you?
Try to update Nativewind 4.0.36, I think it will be solved. I had a similar issue with css styling and it was due to Nativewind bugs. After updating to 4.0.36, the problems disappeared.
Thank you from the bottom of my heart. Your kindness and support mean the world to me.
When using React Native Reusables, here's the step-by-step process I followed:
npx create-expo-app@latest rnr-ts --template blank-typescript
global.css
or tailwind.config.js
file.After trying many solutions and doing a lot of research, I finally found your advice: simply upgrading NativeWind from version 4.0.1 to 4.0.36. It worked like magic!
Describe the bug I have an expo project in a monorepo using Yarn workspaces. Over the past couple of days been trying to implement NativeWind using the expo router v4 guide along with react-native-reusables setup guide. Using tailwind by itself works, but not when using the components provided by react-native-resuables ~ styles are not applied. I continue to get the warning
WARN "hsla(0)" is not a valid color or brush
. Unsure why this is happening.Any help would be greatly appreciated.
bable.config.js
metro.config.js
tailwind.config.js
global.css
React Native: 0.72.10 Expo: 49 Tailwindcss: 3.4.10 Nativewind: 4.0.1