Reputation: 930
Getting
undefined is not an object ( evaluating '_react2.PropTypes.oneOfType')
While using react-native-camera .
using [email protected] with following react native version.
react-native-cli: 2.0.1
react-native: 0.55.2
What i tried inside app.js is
import React, { Component, PropTypes } from 'react';
and
import PropTypes from 'prop-types';
But not worked.
Upvotes: 1
Views: 2457
Reputation: 22189
PropTypes
package has been separated from react
since v15.5 as mentioned here
Since you're using an older version of react-native-camera
, therefore they contain old dependencies in their index.js
react-native-camera index.js v0.6 contains
import React, { Component, PropTypes } from 'react';
Therefore you need to update the package since they have major changes and revamped folder structure as seen in Camera.js
Upvotes: 4