react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

Unable to resolve path to module 'react-native-image-resizer'.eslint(import/no-unresolved)

Open gungdeaditya opened this issue 6 years ago • 2 comments

I just wondering that when I use lint, I found the error for this. Resizer works fine, unless this one, how can we fix it for lint staged ?

gungdeaditya avatar Feb 12 '19 10:02 gungdeaditya

i have the same problem Screenshot 2019-03-13 at 11 20 16

installed with yarn add react-native-image-resizer checked in package.json -> exists in dependencies as "react-native-image-resizer": "^1.0.1"

cristian-milea avatar Mar 13 '19 09:03 cristian-milea

I was having the same problem and when I checked the folder node_modules/react-native-image-resizer, I noticed it doesn't have the index.js, but index.ios.js and index.android.js instead. It would be nice to have an index.js... but for now, you can fix this lint problem by importing the file directly like this: import ImageResizer from 'react-native-image-resizer/index.android' or import ImageResizer from 'react-native-image-resizer/index.ios

A workaround would be creating a component with an index.js that exports to correct react-native-image-resizer according to the OS.

andresouza avatar Apr 24 '19 19:04 andresouza

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 01 '22 19:09 stale[bot]

This issue has been automatically closed. Thank you for your contributions.

stale[bot] avatar Sep 09 '22 03:09 stale[bot]