Zemke / react-native-peerjs

PeerJS for React Native
55 stars 36 forks source link

Module `react-native-webrtc` does not exist in the Haste module map #3

Closed hg5734 closed 4 years ago

hg5734 commented 4 years ago

import Peer from 'react-native-peerjs'; I had imported the above module and this error is coming

bundling failed: Error: Unable to resolve module react-native-webrtc from /Users/himanshu/project/node_modules/react-native-peerjs/dist/react-native-peerjs.js: Module react-native-webrtc does not exist in the Haste module map

can you tell how to fix this ?

embeddedio commented 4 years ago

for me i just install react-native-webrtc

hg5734 commented 4 years ago

yes right after installation

ReferenceError: Can't find variable: location

This error is coming

hg5734 commented 4 years ago

This error is also is coming error [Error: The current browser does not support WebRTC]

embeddedio commented 4 years ago

i have it also it's about https i think, you need to change the src code inside node_modules->react-native-peerjs->dist->react-native-peerjs.js and search for location and remove the line. this solution is temporary the time they fix the bug.

hg5734 commented 4 years ago

@embeddedio @Zemke do you guys have any solution for [Error: The current browser does not support WebRTC] ?

embeddedio commented 4 years ago

@hg5734 for me just install react-native-webrtc and remove installed app on android and rebuild

Zemke commented 4 years ago

react-native-peerjs requires you to install react-native-webrtc the way it’s described there.