Nativebase: 2.7.2 has warnings / The warning doesn't accur 2.7.1

Created on 20 Jul 2018  路  16Comments  路  Source: GeekyAnts/NativeBase

I used nativebase 2.7.1 / but today I updated nativebase to 2.7.2 and It makes warnings like below..
3 warnings..

is it my fault? or just bugs in 2.7.2 version?

screenshot_1532068912
screenshot_1532068934
screenshot_1532068941

awaiting response

Most helpful comment

I've got the same problem. I tried to revert to 2.7.1 and got the same error. After a few tries, this is what worked on windows 10 for me:

  • change version of native-base in package.json to 2.7.1
  • delete node-modules folder & package-lock.json
  • in windows power shell do npm install

I'm not sure what the problem was(Version, cmd or something else), i may test it later when my project is finished.

All 16 comments

I'm getting these warnings as well and I'm on 2.3.5.

Invalid props.style key `NativeBase` supplied to `View`.
Bad object: {
  "NativeBase": {
    "Label": {
      ".focused": {
        "width": 0
      },
      "fontSize": 17
    },
    "Icon": {
      "fontSize": 30,
      "color": "#000"
    },
    "IconNB": {
      "fontSize": 30,
      "color": "#000"
    },
    "Input": {
      ".multiline": {
        "height": null
      },
      "height": 50,
      "color": "#000",
      "paddingLeft": 5,
      "paddingRight": 5,
      "flex": 1,
      "fontSize": 17
    }
  },
  "borderLeftWidth": 0,
  "borderRightWidth": 0,
  "borderTopWidth": 0,
  "borderBottomWidth": 2,
  "borderColor": "#D9D5DC",
  "backgroundColor": "transparent",
  "flexDirection": "row",
  "alignItems": "center",
  "marginLeft": 2,
  "opacity": 1
}
Valid keys: [
  "display",
  "width",
  "height",
  "start",
  "end",
  "top",
  "left",
  "right",
  "bottom",
  "minWidth",
  "maxWidth",
  "minHeight",
  "maxHeight",
  "margin",
  "marginVertical",
  "marginHorizontal",
  "marginTop",
  "marginBottom",
  "marginLeft",
  "marginRight",
  "marginStart",
  "marginEnd",
  "padding",
  "paddingVertical",
  "paddingHorizontal",
  "paddingTop",
  "paddingBottom",
  "paddingLeft",
  "paddingRight",
  "paddingStart",
  "paddingEnd",
  "borderWidth",
  "borderTopWidth",
  "borderStartWidth",
  "borderEndWidth",
  "borderRightWidth",
  "borderBottomWidth",
  "borderLeftWidth",
  "position",
  "flexDirection",
  "flexWrap",
  "justifyContent",
  "alignItems",
  "alignSelf",
  "alignContent",
  "overflow",
  "flex",
  "flexGrow",
  "flexShrink",
  "flexBasis",
  "aspectRatio",
  "zIndex",
  "direction",
  "shadowColor",
  "shadowOffset",
  "shadowOpacity",
  "shadowRadius",
  "transform",
  "transformMatrix",
  "decomposedMatrix",
  "scaleX",
  "scaleY",
  "rotation",
  "translateX",
  "translateY",
  "backfaceVisibility",
  "backgroundColor",
  "borderColor",
  "borderTopColor",
  "borderRightColor",
  "borderBottomColor",
  "borderLeftColor",
  "borderStartColor",
  "borderEndColor",
  "borderRadius",
  "borderTopLeftRadius",
  "borderTopRightRadius",
  "borderTopStartRadius",
  "borderTopEndRadius",
  "borderBottomLeftRadius",
  "borderBottomRightRadius",
  "borderBottomStartRadius",
  "borderBottomEndRadius",
  "borderStyle",
  "opacity",
  "elevation"
]
    in View (at createAnimatedComponent.js:154)
    in AnimatedComponent (at TouchableOpacity.js:247)
    in TouchableOpacity (at Item.js:292)
    in Item (at connectStyle.js:384)
    in Styled(Item) (at Home.js:106)
    in RCTView (at View.js:60)
    in View (at Home.js:105)
    in RCTView (at View.js:60)
    in View (at Home.js:103)
    in Home (at SceneView.js:17)
    in SceneView (at CardStack.js:466)
    in RCTView (at View.js:60)
    in View (at createAnimatedComponent.js:154)
    in AnimatedComponent (at Card.js:12)
    in Card (at PointerEventsContainer.js:39)
    in Container (at CardStack.js:498)
    in RCTView (at View.js:60)
    in View (at CardStack.js:414)
    in RCTView (at View.js:60)
    in View (at CardStack.js:413)
    in CardStack (at CardStackTransitioner.js:67)
    in RCTView (at View.js:60)
    in View (at Transitioner.js:142)
    in Transitioner (at CardStackTransitioner.js:19)
    in CardStackTransitioner (at StackNavigator.js:41)
    in Unknown (at createNavigator.js:13)
    in Navigator (at createNavigationContainer.js:226)
    in NavigationContainer (at App.js:10)
    in RCTView (at View.js:60)
    in View (at Root.js:13)
    in Root (at connectStyle.js:384)
    in Styled(Root) (at App.js:9)
    in App (at renderApplication.js:33)
    in RCTView (at View.js:60)
    in View (at AppContainer.js:102)
    in RCTView (at View.js:60)
    in View (at AppContainer.js:122)
    in AppContainer (at renderApplication.js:32)

Did you found any solution?
I'm getting these warnings on 2.6.1

I can't find anything yet

+1 (Only 'supplied to ScrollView')

In my case I got a warning after putting the Content tag in component.
After re-creating the project in 2.7.1, warning disappeared.

react-native-cli: 2.0.1
react-native: 0.56.0

Same error.

    in View (at createAnimatedComponent.js:154)
    in AnimatedComponent (at TouchableOpacity.js:247)
    in TouchableOpacity (at Item.js:292)
    in Item (at connectStyle.js:384)
    in Styled(Item) (at HomeScreen.js:59)

My use of Item:

          <Form>
            <Item>
              <Input
                placeholder="Username"
                autoCapitalize="none"
                onChangeText={username => this.setState({ username })}
                value={this.state.username}
              />
            </Item>

Somehow the "Invalid props.style key NativeBase supplied to ScrollView.... appeared today...

my project:

react-native init app1 ; cd app1
npm install --save redux react-redux redux-thunk moment react-navigation react-native-vector-icons native-base
npm install
react-native link
react-native link react-native-vector-icons

Updated npm which fixed the issue for me..

nvm install-latest-npm
  "dependencies": {
    "color": "1.0.3",
    "lodash": "4.13.1",
    "moment": "2.13.0",
    "native-base": "2.7.2",
    "react": "16.4.1",
    "react-native": "0.56.0",
    "react-navigation": "1.5.0"
  }

I tried NativeBase KitchenSink with these dependencies, no warnings

let me know how I can help here

Closing this due no response

I've got the same problem. I tried to revert to 2.7.1 and got the same error. After a few tries, this is what worked on windows 10 for me:

  • change version of native-base in package.json to 2.7.1
  • delete node-modules folder & package-lock.json
  • in windows power shell do npm install

I'm not sure what the problem was(Version, cmd or something else), i may test it later when my project is finished.

Its difficult to fix issue, unless its reproducible @k-neo @abonander @nixidee
I have shared my response above
If this still happens, then try putting this on snack, and try to reproduce

Have the same issue, it just popped out suddenly on one of my projects , I'm on "native-base": "^2.7.2",

I mentioned this in my previous comments that

If this still happens, then try putting this on snack, and try to reproduce

rm -r node_modules && yarn did the job for me. I was getting the "Invalid props.style key NativeBase supplied to ScrollView" warning.

Like @SupriyaKalghatgi already mentioned, this is hard to reproduce. It's a very strange bug.

I was getting this error on multiple components. The error is a little misleading because in one instance, the only way to clear warning was to remove button completely.

Tried changing versions, clearing caches, node_modules and removing styles on affected components.

Eventually fixed by deleting package-lock.json

i think this warning appears when using react-native version under 0.56.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natashache picture natashache  路  3Comments

natashache picture natashache  路  3Comments

inv2004 picture inv2004  路  3Comments

sihemhssine picture sihemhssine  路  3Comments

eggybot picture eggybot  路  3Comments