After running npx create-expo-module, running the example app results in a message in the Xcode console

Invariant Violation: Failed to call into JavaScript module method RCTDeviceEventEmitter.emit(). Module has not been registered as callable. 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.

The app loads and renders nothing. After a few reloads the message “Hello World :wave:” might show up. Implementing a more complex module doesn’t render at all. I’ve tried several options and nothing has worked.

Reran prebuild
Ran react-native-clean-project and cleared everything in the ios folder and all caches

As discussed on Discord, this sometimes works, especially if you remove the call to YourMod.hello() and add it back again, or the import.

But if you use yarn instead of npm then it seems to work reliably.

yarn create expo-module

Yes, I got the generated default app working like this but the issue still occurs when the module isn’t the example one generated. I have removed any use of event emitters because I don’t need it and the error reoccurs

I have followed this repo closely GitHub - barthap/expo-music-picker: A music picker library for React Native. Provides access to the system's UI for selecting songs from the phone's music library. but still cannot get it to work. The only difference is I want to export a react component that consumes the native module instead of the module itself