doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.2k stars 984 forks source link

Can't run example app on ios - seemingly incompatible with yarn 3 #2142

Closed puckey closed 10 months ago

puckey commented 10 months ago

Describe the Bug When I try to run the example app on ios using the instructions at https://github.com/doublesymmetry/react-native-track-player/blob/main/example/README.md I get the error new NativeEventEmitter() requires a non-null argument

Happens on real device & simulator. I made sure to clone the repo from scratch to be sure I am not running into caching issues.

Steps To Reproduce

git clone git@github.com:DoubleSymmetry/react-native-track-player.git
cd react-native-track-player
yarn
yarn build
cd example
yarn
cd ios && pod install && cd ..

then open the workspace file in ios/RNTPExample.xcworkspace and change the sign team if necessary and run it

Note that I have not yet tried running it on Android.

puckey commented 10 months ago

So it seems this error started happening with the following commit: 864417f27c8dd8bfbcc77ee037756b5971a8478b

The only way I was able to get things working again was to remove Yarn 3 and move back to Yarn 1.

I see a reference to Yarn 1 in this commit: https://github.com/doublesymmetry/react-native-track-player/commit/b52c5c25e69baec96b995f65571b3ac4ac49af39

@dcvz do you happen to know if Yarn 1 is now a must?

dcvz commented 10 months ago

I've always used yarn v1 and never updated 😅 it could be that linking in this manner was a classic yarn thing and it's something else in newer versions.

puckey commented 10 months ago

okay - I guess if someone else experiences this issue, they should be able to find this issue : )