Answers for "TypeError: undefined is not an object (evaluating '_reactNativeImagePicker.default.showImagePicker')"

2

TypeError: undefined is not an object (evaluating '_reactNativeImagePicker.default.launchImageLibrary')

// I had this same issue and this is how I solved it.
import * as ImagePicker from "react-native-image-picker"
Posted by: Guest on August-05-2021
1

[Fri Apr 16 2021 12:41:49.460] ERROR TypeError: undefined is not an object (evaluating '_reactNativeImagePicker.default.showImagePicker')

import * as ImagePicker from "react-native-image-picker"


                <Button onPress={() =>
                        ImagePicker.launchImageLibrary(
                          {
                            mediaType: 'photo',
                            includeBase64: false,
                            maxHeight: 200,
                            maxWidth: 200,
                          },
                          (response) => {
                            console.log(response);
                            this.setState({resourcePath: response});
                          },
                        )
                      }
                title="Select Image"/>
Posted by: Guest on April-16-2021

Code answers related to "TypeError: undefined is not an object (evaluating '_reactNativeImagePicker.default.showImagePicker')"

Browse Popular Code Answers by Language