Ketan Malhotra
Ketan Malhotra

Reputation: 1250

undefined is not an object '_react2.PropTypes.bool'

I'm using react-native 0.49.5 and my application was working just fine but when I tried to install and link react-native-image-cropper it gave me an error so just to confirm if it's an issue with that library, I removed it but it is still giving me the same error: enter image description here

I don't understand this error since this is all it says. Anyone has any idea what I'm missing?

Upvotes: 2

Views: 4123

Answers (1)

ShinnedHawks
ShinnedHawks

Reputation: 156

Please import the PropTypes module. it has been moved to an external package so in order to use PropTypes you'll need to import the package.

sudo npm install prop-types --save

And then reference the package like this

import PropTypes from 'prop-types';

Note : Please remove the outdated package usage. While adding dependencies please make sure that package version is support by the react latest version.

Upvotes: 6

Related Questions