stream-browserify and readable-stream need updated to latest version
yreenchan opened this issue · 4 comments
Can confirm, updating stream-browserify
and readable-stream
fixed this issue for me. For search indexing purposes, the issue is the error Object prototype may only be an Object or null.
occurring whenever a module tries to load any dependency using streams, including (in my case) zlib
(which is browserify-zlib
in react-native
).
Something to note when performing this fix:
If you use yarn
and run yarn upgrade
to install the new versions of stream-browserify
and readable-stream
, it will overwrite any hacks that rn-nodeify
performed. Run rn-nodeify --hack
to fix them, but note that running rn-nodeify --install
will most likely overwrite the versions of stream-browserify
and readable-stream
in package.json
with the old versions again.
I am experiencing this issue, but only in release builds, not development mode. Also did not seem to happen without react-native-tcp
. Nevertheless I still use react-native-udp
.
This is the error I am getting_
04-04 10:21:19.482 29137 29206 E ReactNativeJS: Object prototype may only be an Object or null.
04-04 10:21:19.500 29137 29206 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
It happens even if I run yarn upgrade
and then rn-nodeify --hack
. After the hack, the packager complains about not finding querystring
package.
Any valuable insights?
I have same problem, how to fix it? thanks.