Doing a React Native update from 0.69.5 to 0.70.3.
App is building on both platforms, but when it runs on Metro this error comes up.
error: Error: resolveDependencies: Found duplicate dependency key 'undefined' in /Users/LA/Repo/sb-app/index.js at resolveDependencies (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/graphOperations.js:484:13)
error: Error: resolveDependencies: Found duplicate dependency key 'undefined' in /Users/LA/Repo/sb-app/index.js
at resolveDependencies (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/graphOperations.js:484:13)
at processModule (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/graphOperations.js:232:31)
at async traverseDependenciesForSingleFile (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/graphOperations.js:221:3)
at async Promise.all (index 0)
at async initialTraverseDependencies (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/graphOperations.js:204:3)
at async DeltaCalculator._getChangedDependencies (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:208:25)
at async DeltaCalculator.getDelta (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler/DeltaCalculator.js:90:16)
at async DeltaBundler.buildGraph (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/DeltaBundler.js:56:5)
at async IncrementalBundler.buildGraphForEntries (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/IncrementalBundler.js:81:19)
at async IncrementalBundler.buildGraph (/Users/LA/Repo/sb-app/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/IncrementalBundler.js:161:19)
Following the error file locations only takes me to the 'throw' statements, and, of course there are no duplicate deps on index.js or app.tsx, as i'm assuming the error is just being thrown upwards to that file. I think...
Anyway, this has stumped me and my team for two days straight now, hoping someone else might have run into this and knows how to debug it. The undefined
key is 0% helpful.
I haven't seen this error posted on stack or github so posting it here.