Reputation: 1999
I'm currently developing a local module named 'ListInstalledApps' for an Expo React Native project. I've added the module to my project's package.json
using Yarn and a relative path to the module's directory. However, I'm encountering several issues when trying to run the app.
When I attempt to run the Android version of the app, it gets stuck on a white screen. The error messages suggest that the JavaScript engine (Hermes in this case) is unable to find the native module 'ListInstalledApps' and other JavaScript modules. I've tried several troubleshooting steps, including rebuilding the native module, clearing caches, reinstalling node modules, checking the application entry file, and disabling Hermes, but none of these steps have resolved the issue.
Error: Cannot find native module 'ListInstalledApps', js engine: hermes
Invariant Violation: Failed to call into JavaScript module method HMRClient.setup(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 0): .
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., js engine: hermes
Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 0): .
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., js engine: hermes
Invariant Violation: No callback found with cbID 0 and callID 0 for module <unknown>. Args: '[{"app_state":"background"}]', js engine: hermes
Invariant Violation: Failed to call into JavaScript module method RCTDeviceEventEmitter.emit(). Module has not been registered as callable. Bridgeless Mode: false. Registered callable JavaScript modules (n = 0): .
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., js engine: hermes
Additionally, when I try to run the iOS version, I encounter an error related to the Podfile
. The error message indicates an unexpected token at line 767. Here's the error message I receive when running yarn ios
:
➜ TiedSiren git:(expo-module-spike) ✗ y ios
yarn run v1.22.17
$ expo run:ios
(node:82913) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
⚠️ Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: 767: unexpected token at ''.
# from /Users/arthurmehmetoglu/Development/TiedSiren/ios/Podfile:18
# -------------------------------------------
# use_expo_modules!
> config = use_native_modules!
#
# -------------------------------------------
pod install --repo-update --ansi exited with non-zero code: 1
✨ Done in 13.46s.
➜ TiedSiren git:(expo-module-spike) ✗
Interestingly, the web version of the app works as expected, and I can read 'Hello world' from the console.
I'm looking for any suggestions on potential issues or actions I could take to debug this problem. Any help would be greatly appreciated!
Upvotes: 0
Views: 149