I’m using Expo’s bare-workflow on an empty project to test the compatibility issues I’m facing. When I try to publish the project to the browser using expo start:web
, I get an error like the following
/home/ben/github/react-native-rtc-barebones/node_modules/react-native-webrtc/ScreenCapturePickerView.js
Attempted import error: 'requireNativeComponent' is not exported from 'react-native-web/dist/index'.
/home/ben/github/react-native-rtc-barebones/node_modules/react-native-webrtc/RTCView.js
Attempted import error: 'requireNativeComponent' is not exported from 'react-native-web/dist/index'.
I simply created the project with expo init
and selected blank typescript. I then added the react-native-webrtc dependency version 1.89.1.
As an aside, I’m developing on a Windows 10 machine with an iPhone. If I’m not able to use the browser with react-native-webrtc, do I have any options for development other than buying an android phone / buying a macbook?
If this is the case, I was thinking about trying out the RTCPeerConnection
from the standard Javascript WebAPI’s, knowing that I’ll have to switch it out for react-native-webrtc once I get a device to develop with.
This repository demonstrates the problem. Clone it and run with npm run web
.
Thanks!