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

IOS broken issue!!!

Open 152016726 opened this issue 5 years ago • 1 comments

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

152016726 avatar Dec 03 '20 06:12 152016726

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.

JorgeFPeres avatar Jan 22 '21 13:01 JorgeFPeres

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 18:09 stale[bot]

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

stale[bot] avatar Sep 08 '22 18:09 stale[bot]