fishjam-dev / react-native-membrane-webrtc

Apache License 2.0
78 stars 8 forks source link

Using Expo Plugin throws error about fs-promise #138

Closed Tonyhaenn closed 1 year ago

Tonyhaenn commented 1 year ago

I'm using expo. When I add the expo plugin to my app.json, expo throws an error about

app.json

"plugins": [
      "@jellyfish-dev/react-native-membrane-webrtc"
    ]

Error when running npx expo

Error: Cannot find module 'promise-fs'
Require stack:
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@jellyfish-dev/react-native-membrane-webrtc/plugin/build/withMembrane.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@jellyfish-dev/react-native-membrane-webrtc/app.plugin.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config-plugins/build/index.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config/build/plugins/withConfigPlugins.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config/build/Config.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/config/build/index.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/cli/build/src/utils/analytics/getDevClientProperties.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/cli/build/src/start/resolveOptions.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/cli/build/src/start/index.js
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/@expo/cli/build/bin/cli
- /Users/tonyhaenn/repos/react-native-membrane-webrtc-promise-fs-bug/node_modules/expo/bin/cli

Here's a bare repo where all I did was run npx create-expo-app@latest and then added @jellyfish-dev/react-native-membrane-webrtc https://github.com/Tonyhaenn/react-native-membrane-webrtc-promise-fs-bug

Tonyhaenn commented 1 year ago

Adding promise-fs as a dependency to my project clears the error. Though it's odd that it's happening.

incubo4u commented 1 year ago

Hi @Tonyhaenn the issue is fixed in the latest release 7.0.0

Tonyhaenn commented 1 year ago

Confirmed! Thank you