react-native-image-resizer
react-native-image-resizer copied to clipboard
Unable to resolve path to module 'react-native-image-resizer'.eslint(import/no-unresolved)
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 ?
i have the same problem
installed with yarn add react-native-image-resizer
checked in package.json -> exists in dependencies as "react-native-image-resizer": "^1.0.1"
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.
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.
This issue has been automatically closed. Thank you for your contributions.