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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰] Cannot find module 'react-native-image-picker' or its corresponding type declarations. #1554

Closed
ighotouch opened this issue Dec 22, 2020 · 8 comments

Comments

@ighotouch
Copy link

Description

Explain the bug in as much detail as possible
Cannot find module 'react-native-image-picker' or its corresponding type declarations.

@BretzelLudique
Copy link

Facing the same issue, temporarily using this :
import {launchCamera, launchImageLibrary} from 'react-native-image-picker/src/index';

@ravirajn22
Copy link
Contributor

@Johan-dutoit can you check the issue with typescript implementation, in a fresh project not the example one.

@Andidevnk
Copy link

@ighotouch @ravirajn22 @BretzelLudique
Use like this
import * as ImagePicker from 'react-native-image-picker/src';

@angelolanche
Copy link

angelolanche commented Dec 26, 2020

I was with the same problem. It was fixed using import { launchCamera, launchImageLibrary } from 'react-native-image-picker/src' Thanks, guys

@marcelxsilva
Copy link

I'm using version "react-native-image-picker": "^3.1.1", only remove operator ^ and worked.

@olayenca
Copy link

Randomly started getting this issue on react-native-image-picker@^2.3.1 after a fresh install ImagePicker.showImagePicker() no longer worked. @marcelxsilva 's suggestion worked for me after a reinstall.

@djMax
Copy link

djMax commented Jan 16, 2021

I think the problem is package.json:

https://github.com/react-native-image-picker/react-native-image-picker/blob/main/package.json#L7

It should be

  "types": "lib/typescript/index.d.ts",

xgenem added a commit to xgenem/react-native-image-picker that referenced this issue Jan 18, 2021
Fix for Cannot find module 'react-native-image-picker' or its corresponding type declarations. react-native-image-picker#1554
Johan-dutoit pushed a commit that referenced this issue Jan 19, 2021
Fix for Cannot find module 'react-native-image-picker' or its corresponding type declarations. #1554
Johan-dutoit pushed a commit that referenced this issue Jan 19, 2021
## [3.1.4](v3.1.3...v3.1.4) (2021-01-19)

### Bug Fixes

* wrong types path ([#1554](#1554)) ([#1581](#1581)) ([fd27d94](fd27d94))
@Johan-dutoit
Copy link
Collaborator

馃帀 This PR is included in version 3.1.4 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

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

No branches or pull requests

9 participants