nodejs server opens and closes quickly after react-native run-android

just simply open two terminal inside the project folder then first run on the 1st terminal ( npx react-native start) to run the server then open the other terminal and run ( npx react-native run-androi/run-ios) to run the application on your android/ios device


Open Your Project Folder in IDE like Visual Studio Code etc

Click on node_modules folder

Click on metro-config folder

Click on src folder

Click on default folder

Open blacklist.js file and replace the following code

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__\/.*/
];