How to fix metro bundler script not working -
How to fix metro bundler script not working
by on on android

How to fix metro bundler script not working

Metro bundler issue solved, use this steps below to reproduce.

The steps below to resolve metro bundler issue.

Replace : 

var sharedBlacklist = [
  /node_modules[/\\]react[/\\]dist[/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

with : 


var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

If you need more clarification the video below will help you.


npx react native init 

then the above steps to solve it