react-native-styled-toast
react-native-styled-toast copied to clipboard
Package install not working on yarn and npm
I struggled with the issue for multiple hours and finally came to the conclusion that style-components and styled-system where not being installed with react-native-styled-toast so it was necessary to install them separately to get the package running without crashing on my mobile app and now currently i get an error
The Error Code:
Invariant Violation: Invalid prop `backgroundColor` supplied to `StyleSheet generated`: background
Valid color formats are
- '#f0f' (#rgb)
- '#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)
StyleSheet generated: { "borderColor": "red", "backgroundColor": "background", "paddingRight": 0, "paddingTop": 8, "paddingBottom": 8, "marginBottom": 32, "flexGrow": 1, "flexShrink": 1, "flexBasis": 0, "zIndex": 1000, "width": "100%", "borderWidth": 1, "borderRadius": 4, "alignItems": "center", "flexDirection": "row", "justifyContent": "center" }
This error is located at: in StyledNativeComponent (created by Styled(Component)) in Styled(Component) in Unknown in RCTView (created by View) in View in StyledNativeComponent (created by Styled(View)) in Styled(View) (created by ToastProvider) in ToastProvider (created by App) in ThemeProvider (created by App) in RCTView (created by View) in View (created by App) in App (created by ExpoRoot) in ExpoRoot in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer