Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process not defined when triggering peer.on("connect") and peer.on("data") in reactjs #885

Open
idiosyncrasy00 opened this issue Apr 12, 2022 · 8 comments

Comments

@idiosyncrasy00
Copy link

idiosyncrasy00 commented Apr 12, 2022

Hello. I am having issues when implementing simple-peer in reactjs, which is whenever another person joins the room, it cannot trigger these two functions of simple-peer. However my implementation works fine in a non-framework web (using plain javascript and html).
The almost similar issue can be found here:
https://stackoverflow.com/questions/70899364/simple-peer-on-data-stream-throws-process-not-defined-error
Thank you for reading.

@Velua
Copy link

Velua commented Apr 17, 2022

Make sure you're using vanilla React as I was using Vite before and it wouldn't work.

@vedantkarle
Copy link

I am getting the same error

@ghost
Copy link

ghost commented May 10, 2022

I'm having a similar issue with simple-peer and reacjs, also the console throw a readable stream error when using peer.on("data")

@Bernard-Murphy
Copy link

I have the same problem. Was able to fix it by using the simplepeer.min.js file instead of the node module.

@AlexMesser
Copy link

Same problem using this example with Create React App

@abhi-dasgupta
Copy link

getting this too on create-react-app

@StanislavMayorov
Copy link

It helped me to fix an issue with create-react-app. It's important to init before simple-peer
https://stackoverflow.com/a/77078047/5700121

@puopg
Copy link

puopg commented May 15, 2024

This should be the answer: #767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants