After upgrading to Expo 46, suddenly I started seeing these errors. I have searched on them, but did not find a solution so far. The app doesn’t start anymore, it directly shows these errors.
Any ideas?
ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.source')
Error: Unable to resolve module ./http://192.168.xx.xx:19000/index.ts from C:xx/.:
None of these files exist:
* http:192.168.xx.xx:19000index.ts(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg|.android.cjs|.native.cjs|.cjs)
* http:192.168.xx.xx:19000index.tsindex(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.svg|.native.svg|.svg|.android.cjs|.native.cjs|.cjs)
at ModuleResolver.resolveDependency (C:xxnode_modulesmetrosrcnode-hasteDependencyGraphModuleResolution.js:136:15)
at DependencyGraph.resolveDependency (C:xxnode_modulesmetrosrcnode-hasteDependencyGraph.js:231:43)
at C:xxnode_modulesmetrosrclibtransformHelpers.js:129:24
at Server._resolveRelativePath (C:xxnode_modulesmetrosrcServer.js:1137:12)
at async Server.requestProcessor [as _processBundleRequest] (C:xxnode_modulesmetrosrcServer.js:464:37)
at async Server._processRequest (C:xxnode_modulesmetrosrcServer.js:420:9)
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called
I solved the issue by divide and conquer strategy.
Commenting out every component and uncommenting them step by step until I found the issue.
In my case it was one of my plugins react-native-qrcode-svg
, which needed to be updated in order to support the Expo 46 upgrade
.