metro-bundler
How to make Metro (React Native packager) ignore certain directories
The configuration for this has a habit of changing between RN versions. See below for version-specific instructions on creating a config file, loading the config file and clearing the cache. For React Native >= 0.64 to 0.71(+?) A rename of the helper function from blacklist to exclusionList was made in Metro 0.60, and the config … Read more
Metro bundler: Error: EISDIR: illegal operation on a directory, read
Replace this code in `MainApplication.java @Override protected String getJSMainModuleName() { return “src/index”; <—add this }
No apps connected. Sending “reload” to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB
⚠️ For iOS users : Check that your build target is Debug : Xcode Product => Scheme => Edit Scheme => Debug (and not release ! ) ⚠️ For Android users : I have found a solution that I posted on github. Not the best but it could be useful: First, you have to open … Read more
TypeError: cb.apply is not a function
I had a very similar problem on CI, but it works normally on my local machine (Node 13). In the CI, when building the project on CircleCI or on AppCenter with a code that I already released two months ago it throws the error below. It just does not make sense, it’s like node had … Read more
How to resolve the error on ‘react-native start’
I just got a similar error for the first time today. It appears in \node_modules\metro-config\src\defaults\blacklist.js, there is an invalid regular expression that needed changed. I changed the first expression under sharedBlacklist from: var sharedBlacklist = [ /node_modules[/\\]react[/\\]dist[/\\].*/, /website\/node_modules\/.*/, /heapCapture\/bundle\.js/, /.*\/__tests__\/.*/ ]; to: var sharedBlacklist = [ /node_modules[\/\\]react[\/\\]dist[\/\\].*/, /website\/node_modules\/.*/, /heapCapture\/bundle\.js/, /.*\/__tests__\/.*/ ];
Unable to load script.Make sure you are either running a Metro server or that your bundle ‘index.android.bundle’ is packaged correctly for release
You haven’t started the bundler yet. Run npm start or react-native start in the root directory of your project before react-native run-android.