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.
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.