Skip to content
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

Package install not working on yarn and npm #93

Open
Dragondemolish2 opened this issue Jun 2, 2022 · 0 comments
Open

Package install not working on yarn and npm #93

Dragondemolish2 opened this issue Jun 2, 2022 · 0 comments

Comments

@Dragondemolish2
Copy link

Dragondemolish2 commented Jun 2, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant