Actually I have installed unimodule previously was running react native cli because of tensorflow/tfjs-react-native I have to install unimodule but whenever I am doing yarn android I am getting below error Error: Unable to resolve module ./.expo/.virtual-metro-entry from /home/lipl-149/Desktop/Ankit/ReactJs/ReactNativeTry/.:
None of these files exist:
To able to do image expression recognition
Had the same issue, turns out I had the incorrect configuration on metro.config.js.
You should have a similar configuration as Expo. This is from version 51, but it should work on previous Expo versions.
What I had instead was using the recommended React Native Metro configuration, like so:
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
instead of
const { getDefaultConfig } = require('expo/metro-config');
Hope this helps!
I'm using Expo with prebuild to generate my react-native app.
I ran into this while upgrading from Expo 48 to Expo 51.
It looks like that process had updated the ios/App/AppDelegate.mm file
to replace "index" with ".expo/.virtual-metro-entry" in the following code block:
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
So I edited the code block back to this:
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
This defeats the purpose of prebuild as I'm updating native files, so if someone knows if there's a way to update prebuild to fix this, let me know. (This PR may be useful for research) But I just wanted to get past this problem as I couldn't find another solution. Hopefully this may help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With