trietho / react-native-a-beep

A very lite module to play system sounds and beep for react-native apps (no sound files)
56 stars 33 forks source link

Cannot read property 'StopSysSound' of null, js engine: hermes #28

Open GeandersonTodimo opened 1 year ago

GeandersonTodimo commented 1 year ago

package.json "react": "18.1.0", "react-native": "0.70.5", "react-native-a-beep": "^1.2.0",

The following error is occurring. TypeError: Cannot read property 'StopSysSound' of null, js engine: hermes

jackywxd commented 1 year ago

I had the same error and I was able to fix it by moving RNReactNativeABeep.podspec up one level from current folder ios.

guptavishesh143 commented 1 year ago

I had the same error and I was able to fix it by moving RNReactNativeABeep.podspec up one level from current folder ios.

@jackywxd can you please elaborate the steps what you did, Are talking about the IOS level ?

jackywxd commented 1 year ago

RNReactNativeABeep.podspec should be moved to folder react-native-a-beep from its subfolder ios

image

QuentG commented 1 year ago

@jackywxd Do you need to apply a patch to do this or something else? I'd love the solution ! Thanks ;)

Rodrigo816 commented 1 year ago

@jackywxd Do you need to apply a patch to do this or something else? I'd love the solution ! Thanks ;)

Yes you can use https://www.npmjs.com/package/patch-package to patch it.

jackywxd commented 1 year ago

If @trietho could fix it in the main branch that's the most ideal solution. For temporary solution, @Rodrigo816 is correct, you could use patch-package to patch it in case you need to run yarn install again. @QuentG

simon-assistiq commented 5 months ago

I tried thie patch-package + moving podspec approach and it seemed to work fine, but on subsequent pod installs the Podfile.lock showed changes removing RNReactNativeABeep and the problem would recur... I thought I followed the steps for patch-package properly… maybe not?