I started by updating package.json with "react-native-browser-builtins": "^2.0.3" and then I ran npm install.
I am also using another module called losant-mqtt, which I think was originally written to run in a Node.js server environment. Before using react-native-browser-builtins, I used to get errors for missing modules util, events and buffer. These errors are now gone.
There's one file in losant-mqtt that has the following statement:
var Stream = require('stream').Stream
This is still giving an error, although react-native-browser-builtins is supposed to include this. Please let me know how to solve this.
I started by updating
package.json
with"react-native-browser-builtins": "^2.0.3"
and then I rannpm install
.I am also using another module called losant-mqtt, which I think was originally written to run in a Node.js server environment. Before using
react-native-browser-builtins
, I used to get errors for missing modules util, events and buffer. These errors are now gone.There's one file in losant-mqtt that has the following statement:
var Stream = require('stream').Stream
This is still giving an error, although
react-native-browser-builtins
is supposed to include this. Please let me know how to solve this.