It seems it is the bug in the old version of react-native I also have suffered from it sometimes, I have solved the same problem as below:
To resolve that,
1. We have to move to the project folder.
2. Open \node_modules\metro-config\src\defaults\blacklist.js
3. Replace the following regex of var sharedBlacklist :
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__\/.*/
];
You have two solutions:
either you downgrade node to V12.10.0 or you can modify this file for every project you will create.
**node_modules/metro-config/src/defaults/blacklist.js**
Change this:
var sharedBlacklist = [
/node_modules[/\\]react[/\\]dist[/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/
];
to this:
var sharedBlacklist = [
/node_modules[\/\\]react[\/\\]dist[\/\\].*/,
/website\/node_modules\/.*/,
/heapCapture\/bundle\.js/,
/.*\/__tests__\/.*/
];