Error: Unknown named module "react-native-webrtc" when imports peerjs module

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

Upvotes: 0

Views: 347

Answers (1)

Felipe Dallagnolo
Felipe Dallagnolo

Reputation: 46

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

Upvotes: 3

Related Questions