facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.24k stars 626 forks source link

TypeError: Cannot read property 'reduce' of undefined #706

Open d3-memscube opened 3 years ago

d3-memscube commented 3 years ago

When I was Trying to build the react-native project using npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle, it gives me something this type of error:

error Cannot read property 'reduce' of undefined. TypeError: Cannot read property 'reduce' of undefined at resolveDependencies (C:\Users\souvi\viqud\viqud-app\node_modules\metro\sr c\DeltaBundler\traverseDependencies.js:644:33) at C:\Users\souvi\viqud\viqud-app\node_modules\metro\src\DeltaBundler\traver seDependencies.js:329:33 at Generator.next () at asyncGeneratorStep (C:\Users\souvi\viqud\viqud-app\node_modules\metro\src \DeltaBundler\traverseDependencies.js:137:24) at _next (C:\Users\souvi\viqud\viqud-app\node_modules\metro\src\DeltaBundler \traverseDependencies.js:159:9) at runNextTicks (node:internal/process/task_queues:61:5) at processTimers (node:internal/timers:497:9) info Run CLI with --verbose flag for more details.

Please give me a solution how to solve it.

vitorsierro commented 10 months ago

@d3-memscube did you find out why this was happening, I'm getting this same error in my project. just running on another computer is ok

GokuVijay commented 7 months ago

@d3-memscube @vitorsierro Anyone found a solution for this ?