"Native module cannot be null"
Closed this issue · 7 comments
Describe the bug
After upgrading to RN 0.60 an invariant error is called on NativeEventEmitter -> "Native module cannot be null".
To Reproduce
Steps to reproduce the behavior:
- Just import react-native-sound-player in any file.
Platform (please complete the following information):
- OS: IOS
Additional context
- This only happens on ios, android is working as expected.
- Tested on Android 9.x, and iPhone 5s, both real devices.
"react-native-sound-player": "0.10.0"
The issue was because the library was not linked. So I manually linked it (or use the cli and revert android linking), and everything works great.
@johnsonsu It would be great if a podspec
was shipped with this, so everything would work out of the box.
EDIT: I've made a PR if you're kind enough to consider it 😬
Hi @mstrk, thank you for the Bug report and the PR! I will do some testing on my side and then merge it!
Hi @kaiyes, in a fresh install or you did upgrade from <=59 to 61.2? If so you need to unlink RNSoundPlayer anyway. react-native unlink react-native-sound-player
.
Cheers
@mstrk thanks for replying. It's a fresh 61.2 install. Took out this library and errors went away. Probably will look into something else like expo which has built in audio player or some other library since the app is super small ( only 2 screens with some text, a FlatList and the audio player )
However, pod install
made it work by the way
hi, anyway to play multi soundView inside Flatlist?