For the past 1.5 days or so, I tried to get react-native-track-player working and I just can't make it happen. No matter what I try I always end up running into the same error block:
ERROR TypeError: null is not an object (evaluating 'TrackPlayer.RATING_HEART')
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 set it up both with react-native expo and 'normal' react-native (according to react-native docu) both with JS and TS. And for all variants of that I tried:
- Deleting/reinstalling node-modules
npm cache verify(as described here),react-native start --reset-cache(from here) and some other cache reset/deletion things.- I've copied the example from their GitHub repo.
- I updated and/or reinstalled pretty much every library (incl.
node)
All of those efforts ended in the exact same error.
So ye, I literally don't know what to do anymore. I'm a beginner at both react-native and app dev in general. So to be honest, it's very likely the mistake I'm making is super stupid/simple. But I just can't find it. I would be more than grateful for any advise.
EDIT 2: Solution - react-native removed jcenter between v0.64 v0.65 which was root of all my problems, check my answer below for details.





