Undefined is not an object (evaluating '_reactNative.ViewPropTypes.style')
Hi, I have an issue with the latest version of nativeBase.
I'm trying just to add an example in my Application.
import { AppRegistry } from 'react-native'
import React, { Component } from 'react';
import { Container, Header, Title, Content, Footer, FooterTab, Button, Left, Right, Body, Icon } from 'native-base';
export default class AnatomyExample extends Component {
render() {
return (
<Container>
<Header>
<Left>
<Button transparent>
<Icon name='menu' />
</Button>
</Left>
<Body>
<Title>Header</Title>
</Body>
<Right />
</Header>
<Content>
// Your main content goes here
</Content>
<Footer>
<FooterTab>
<Button full>
<Text>Footer</Text>
</Button>
</FooterTab>
</Footer>
</Container>
);
}
}
AppRegistry.registerComponent('myApp', () => AnatomyExample)
My package.json:
{
"name": "myApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"lodash": "^4.17.4",
"native-base": "^2.1.4",
"react": "16.0.0-alpha.6",
"react-native": "0.43.4",
"react-native-camera": "git+https://github.com/lwansbrough/react-native-camera.git",
"react-native-vector-icons": "^4.1.1",
"react-navigation": "^1.0.0-beta.9"
},
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"react-test-renderer": "16.0.0-alpha.6"
},
"jest": {
"preset": "react-native"
}
}

I'v tried to delete node_modules, cache clean, npm install, not working.
Thanks,
same
@Tsouef @Dani93380 works perfect for me, try to update react-native package to 0.44.0
@Tsouef @Dani93380 View.propTypes is deprecated and instead ViewPropTypes is used from RN44, which is introduced in the latest version of NativeBase as well. So For RN44 go for NativeBase v2.1.4 and anything below RN44, you can use NB v2.1.3
Thanks, It's working !
I'm using RN38 and NB 2.1.3 and still facing this issue, so frustrating... what should I do?
"native-base": "2.1.4",
"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
works for me
Also tried this with RNRF 3.39.2, got it running
@shivrajkumar i can't upgrade to 0.44.0 because of other dependencies and I'm on
"native-base": "2.1.0",
"react": "15.4.1",
"react-native": "0.42.3",
but nothing working so far even with older native-base versions
I upgrade react-native-router-flux 3.39.0 and get this error, with a simple roll back to version 3.37.0 it works. Could be some related with -v3.39.0 .
@wellmonge thank you! My problem was that in my package.json I was doing:
"react-native-router-flux": "^3.37.0"
But that actually fetches the most recent 3.x.x version. Setting the package version explicitly with:
"react-native-router-flux": "3.37.0"
Solved my problem.
[email protected] "react-native": "^0.42.3" "react": "^15.4.1" "react-native-router-flux": "3.37.0"
Solved It For ME
@matthiasprieth In that case, try using older version of RNRF May be you can check the compatibility versions pf React Native and RNRF
@wellmonge I got my app running with the latest version of React Native, NativeBase and RNRF Check my comment
@matthiasprieth With the versions specified by you, try installing 3.37.0 of RNRF
@SupriyaKalghatgi thx i got it working by switching to version
"react": "~15.4.1",
"react-native": "0.42.0",
and putting
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
details.useVersion "0.42.0" // Your React Native version here
}
}
}
}
in build.gradle. So i think for me it had nothing to do with RNRF. And for the code in build.gradle there is also a dynamic approach on the web, where you don't have to put your react version in it, but i couldn't find it anymore.
Good to know that you got it working.
I'm using nativebase 2.1.4 and react-native 44.2.0 and still get this issue. any fix?
For the life of me, I can't solve this issue. I've tried countless different variations of versions for React, RN, RNRF, as well as clearing caches.
Is there anything else that has been effective that I could be missing?
@scotthollandjr Can you post your package.json here
@shivrajkumar
"firebase": "3.6.8",
"lodash": "^4.17.4",
"react": "15.4.2",
"native-base": "2.1.0",
"react-native": "0.41.1",
"react-native-maps": "git+https://github.com/airbnb/react-native-maps.git",
"react-native-router-flux": "^3.37.0",
"react-native-vector-icons": "4.0.0",
"react-redux": "5.0.2",
"redux": "3.6.0",
"redux-thunk": "2.2.0"
This was the most recent setup before the error occurred
@scotthollandjr And the version of native-base?