79273425

Date: 2024-12-11 23:18:08
Score: 2.5
Natty:
Report link

I don't think you need this answer anymore, but in case anyone is facing the same problem, this is the solution I found.

Add to metro.config.js:

config.resolver.sourceExts = ['jsx', 'js', 'ts', 'tsx', 'json', 'cjs'];

If you are using Expo, try changing your app.json file:

{
  "expo": {
    ...
    "packagerOpts": {
      "sourceExts": ["cjs"]
    }
}
Reasons:
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same problem
  • Low reputation (0.5):
Posted by: Rosiel Victor