facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 356 forks source link

undefined is not an object (evaluating '_react2.PropTypes.string') #218

Closed SatishMavani closed 5 years ago

SatishMavani commented 6 years ago

below is the code used at one of the place in my app.

import PropTypes from 'prop-types';

BottomNavigationBar.propTypes = { outerContainerStyle: ViewPropTypes.style, innerContainerStyle: ViewPropTypes.style, tabHomeBtn: PropTypes.any, tabOneBtn: PropTypes.any, tabTwoBtn: PropTypes.any, tabThreeBtn: PropTypes.any, tabFourBtn: PropTypes.any, };

I have no idea, How to fix it.

screen shot 2018-09-17 at 10 49 52 pm

package.jason file is:

screen shot 2018-09-17 at 10 52 14 pm
ljharb commented 5 years ago

Looks like something in your graph is using React.PropTypes.string.

SatishMavani commented 5 years ago

One of the packages was using PropTypes.string which I was not able to find out. I confirm that in index.android.bundle file that one of the packages still use PropTypes.string. I ended up by upgrading react-native version to 0.54.1 and it started working. Sorry for the late comment :-|