📅  最后修改于: 2022-03-11 15:04:27.898000             🧑  作者: Mango
I don't have metro-config in my project, now what?
I have found that in pretty older project there is no metro-config in node_modules. If it is the case with you, then,
Go to node_modules/metro-bundler/src/blacklist.js
And do the same step as mentioned in other answers, i.e.
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__\/.*/
];
P.S. I faced the same situation in a couple of projects so thought sharing it might help someone.
Edit
As per comment by @beltrone the file might also exist in,
node_modules\metro\src\blacklist.js