react-native-branch-deep-linking-attribution icon indicating copy to clipboard operation
react-native-branch-deep-linking-attribution copied to clipboard

ReferenceError: Can't find variable: proto when used with metro inlineRequires: true

Open adrienharnay opened this issue 4 years ago • 4 comments

Hello,

I am trying to enable inlineRequires: true in the metro config of the project I am working on, but when doing so I have the following error:

 INFO  Initializing react-native-branch v. 5.0.1
 ERROR  ReferenceError: Can't find variable: proto
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. 
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. 
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

I have tried importing react-native-branch at the root of my app, but that doesn't work.

Would you have any idea how to make this library work with inline requires?

Thanks in advance!

(I'm using react-native-branch 5.0.1 and react-native 0.64)

adrienharnay avatar Mar 19 '21 21:03 adrienharnay

Hello, @adrienharnay. Have you found a solution? I'm currently facing the same problem and wanted to know if you've resolved this issue. Thanks

JSuzara avatar Feb 11 '22 18:02 JSuzara

Hello, I did not dig deeper sorry.

adrienharnay avatar Feb 14 '22 23:02 adrienharnay

Same issue here, any luck?

mtoninelli avatar Aug 23 '22 11:08 mtoninelli

Hi @mtoninelli, can you create a new issue with the version of react-native-branch and react-native you are using? As well as your environment such as android/ios version.

gdeluna-branch avatar Aug 23 '22 17:08 gdeluna-branch