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

Undefined is not an object (evaluating ImagePicker.openCamera) #786

Open
sunithakk opened this issue Aug 6, 2018 · 7 comments
Open

Undefined is not an object (evaluating ImagePicker.openCamera) #786

sunithakk opened this issue Aug 6, 2018 · 7 comments

Comments

@sunithakk
Copy link

Version

{
"name": "img",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"native-base": "^2.7.2",
"react": "16.4.1",
"react-native": "0.55.2",
"react-native-easy-grid": "^0.2.0",
"react-native-image-crop-picker": "^0.20.3",
"react-navigation": "^2.9.3"
},
"devDependencies": {
"babel-jest": "23.4.0",
"babel-preset-react-native": "4.0.0",
"jest": "23.4.1",
"react-test-renderer": "16.4.1"
},
"jest": {
"preset": "react-native"
}
}

Platform

  • iOS
  • Android

Expected behaviour

Actual behaviour

Undefined is not an object (evaluating ImagePicker.openCamera)

@shubham1164
Copy link

Have anybody solved it?

@paul019
Copy link

paul019 commented Jan 14, 2019

+1
(I've the problem also with openPicker...)

@MahmoudMH
Copy link

Same problem with Expo app 👎

@ChristianTucker
Copy link

Same issue.

@tmjordan
Copy link

make sure to correctly link the library to your ios and android projects.
To use with expo, you muste eject your expo project first, then link the library.

@Stoneski93
Copy link

Try link manually

For manual solution, add the following on your MainApplication.java
import com.reactnative.ivpusic.imagepicker.PickerPackage;

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new PickerPackage(), // <== add this
            ....

@fabellonnoe
Copy link

I got rid of this by adding folder react-native-image-crop-picker inside node_modules
and run
cd ios
pod install

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

8 participants