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

stream-browserify and readable-stream need updated to latest version #32

Open
yreenchan opened this issue Feb 24, 2017 · 4 comments
Open

Comments

@yreenchan
Copy link

I recently use react-native-tcp module in my project. It works fine in ios, but it caught errors in android.

error
qq

After I update the modules "stream-browserify" and "readable-stream", It works fine both in ios and android. So I recommend you to update these two packages.

@ArcanoxDragon
Copy link

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.

@jsdario
Copy link

jsdario commented Apr 4, 2017

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?

@scriptfans
Copy link

I have same problem, how to fix it? thanks.

@mvayngrib
Copy link
Member

yarn compat has been added recently by @jd20, and rn-nodeify will no longer overwrite dependencies unless the --overwrite flag is set. Is anyone still experiencing this issue?

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

5 participants