0
votes

I'm facing a complex error when import react-native-peerjs module to any file in React native project. I just tried everything, but nothing works. Can you help me? That is the error.

Error: Unknown named module "react-native-webrtc"

This is the step-by-step if someone wanna test.

npx react-native init teste . yarn add react-native-webrtc . cd ios && pod install . cd .. . yarn add react-native-peerjs . npx react-native run-ios . import Peer from 'react-native-peerjs' in App.js

1

1 Answers

2
votes

On metro.config.js located at the root folder of the app, changing the inlineRequires to false should do the job.