0

I'm trying to use this library. I cloned the code, ran npm install and then ran react-native run-android. As a result I got an error Cannot find module 'metro-config/src/defaults/blacklist'. I looked it up, and found an answer that suggest to change the content of the blacklist.js file because of faulty regex. However, I looked at the path suggested in the answer metro-config/src/defaults/blacklist but it didn't contain any blacklist.js files. I also looked at other paths but still didn't find anything with the name blacklist.js. How can I fix this issue and get the library working?

Node version: v14.17.0

React native version: 0.64.2

Keselme
  • 3,779
  • 7
  • 36
  • 68

1 Answers1

1

I had the same issue in expo-yarn-workspace with the same react-native version. I fixed it by find where 'metro-config/src/defaults/blacklist' is call and replace it
by 'metro-config/src/defaults/exclusionList' because it's been renamed.

https://github.com/facebook/metro/blob/a94200229df4e7f3a9549665142d4ad4b8d32de5/packages/metro-config/src/defaults/exclusionList.js

https://github.com/facebook/metro/issues/453

Let me know if it works for you !

E.D
  • 831
  • 3
  • 16
  • 33