Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I downloaded the example but when I run the project shows this error #41

Closed
joaodematejr opened this issue Nov 7, 2018 · 3 comments
Closed

Comments

@joaodematejr
Copy link

undefined is not an object (evaluating '_react.PropTypes.oneOfType')

camera.js:46:26
loadModuleImplementation
require.js:320:6
guardedLoadModule
require.js:214:36
metroRequire
require.js:136:24

consultasCamera.js:12
loadModuleImplementation
require.js:320:6
guardedLoadModule
require.js:214:36
metroRequire
require.js:136:24

App.js:8
loadModuleImplementation
require.js:320:6
guardedLoadModule
require.js:214:36
metroRequire
require.js:136:24

index.js:4
loadModuleImplementation
require.js:320:6
guardedLoadModule
require.js:207:45
metroRequire
require.js:136:24
global code

static propTypes = {
    ...View.propTypes,
    aspect: PropTypes.oneOfType([
        PropTypes.string,
        PropTypes.number
    ]),
    captureQuality: PropTypes.oneOfType([
        PropTypes.string,
        PropTypes.number
    ]),
    country: PropTypes.string,
    onPlateRecognized: PropTypes.func,
    plateOutlineColor: PropTypes.string,
    showPlateOutline: PropTypes.bool,
    rotateMode: PropTypes.oneOfType([
        PropTypes.string,
        PropTypes.number
    ]),
    torchMode: PropTypes.oneOfType([
        PropTypes.string,
        PropTypes.number
    ]),
    touchToFocus: PropTypes.bool,
};
@RobertSasak
Copy link
Owner

#24

PropTypes are not part of react any more. There is already a pull request for it. In a meanwhile simply rewrite imports of PropTypes in camera.js

@joaodematejr
Copy link
Author

Get resolved by importing inside the file import PropTypes from 'prop-types'; camera.js

@johansantoso
Copy link

The release version is so old, try to fetch the code from master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants