You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: Cannot read property 'reduce' of undefined #706
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.
This is very likely a corrupt transform cache entry, particularly seeing that you're using Windows. Metro's file cache serves a zero-prefixed file as a valid hit, and when we deserialise that null the dependencies access is the first error we hit. On Windows an all-zeroes file is exactly what NTFS can leave behind with a crash or power loss mid-write.
Tracking that specific issue in #1961, so closing this one (apologies it didn't get a response at the time).
For anyone else in the meantime, --reset-cache (or clearing %TEMP%\metro-cache) should get you unstuck.
Activity
vitorsierro commentedon Jan 11, 2024
@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 commentedon Apr 12, 2024
@d3-memscube @vitorsierro Anyone found a solution for this ?
robhogan commentedon Sep 22, 2026
This is very likely a corrupt transform cache entry, particularly seeing that you're using Windows. Metro's file cache serves a zero-prefixed file as a valid hit, and when we deserialise that null the
dependenciesaccess is the first error we hit. On Windows an all-zeroes file is exactly what NTFS can leave behind with a crash or power loss mid-write.Tracking that specific issue in #1961, so closing this one (apologies it didn't get a response at the time).
For anyone else in the meantime,
--reset-cache(or clearing%TEMP%\metro-cache) should get you unstuck.dependencies is not iterable/Cannot read property 'reduce' of undefined:FileStoreserves zero-prefixed cache files as hits #1961