react-native-image-resizer
react-native-image-resizer copied to clipboard
IOS broken issue!!!
In IOS, RN0.61.5 , after run npm install react-native-image-resizer --save ,then pod install . then thorw an Erro: Metro Bundler has encountered an error: while tring to resolve module 'react-native-image-resizer' from file '/Users/ysb/Desktop/zhangdianyipro/web/views/photoStorage/index.js’, the package '/Users/ysb/Desktop/zhangdianyipro/node_modules/react-native-image-resize/package.json' was successfully foound. However,this package itself specifiles a 'main' module field that could not be resolved ('/Users/ysb/Desktop/zhangdianyipro/node_modules/react-native-image-resizer/index.js.Indeed, none of these files exist: */Users/ysb/Desktop/zhangdianyipro/node_modules/react-native-image-resizer/index.js
First check this:
This can happen if you have a custom configuration for metro and haven't specified ts and tsx as valid extensions. These extensions are present in the default configuration. To check if this is the issue, look for a metro.config.js file in your project and check if you have specified the sourceExts option. It should at least have the following configuration:
sourceExts: ['js', 'json', 'ts', 'tsx'];
Second
This happen when you install a new library, while the Metro is running, so close your Metro and your IOS simulator, reopen.
Hope this works. See you.
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.