-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
5.0.3 release broken for react native, downgrade to 5.0.2 #1672
Comments
Couldn't the mode (browser or node process) be set by the user? |
We could think about adding an env var for that. Anyway please let me know:
|
@stephanbruny news on this? |
I think there is no |
I wonder how this: 183b35a Could have broken react native so. Maybe it's the webpack thing? Is there any other way to detect react native? |
Stackoverflow says this: |
@tanoc @grizmio @stephanbruny I suggest to use: import * as mqtt from 'mqtt/dist/mqtt' Let me know id that works |
FYI starting from 5.2.1 you can now import mqtt using:
|
For those using version 5.0.3 in react native and getting
"Error: ws does not work in the browser. Browser clients must use the native WebSocket object"
just downgrade to 5.0.2 and it will work.
npm i --save [email protected]
The text was updated successfully, but these errors were encountered: