Skip to content

Object prototype may only be an Object or null! #42

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

Closed
omidnavy opened this issue Feb 26, 2017 · 13 comments
Closed

Object prototype may only be an Object or null! #42

omidnavy opened this issue Feb 26, 2017 · 13 comments

Comments

@omidnavy
Copy link

Hi

I'm working on a project which needs tcp socket , and when i tried to use this library , i get the error mentioned in the title ! I know its a stream /rn-nodeify error , but while its a dependency of native-tcp , I posted this issue here , is there anything i can do to fix this one ?
react-native @0.41.2
react-native-net @3.2.1
rn-nodeify @7.0.1

screenshot_2017-02-26-11-16-05

@ArcanoxDragon
Copy link

I'm getting this when trying to nodeify zlib for react-native as well. I haven't been able to find any information anywhere on this issue.

@ArcanoxDragon
Copy link

I found a temporary workaround for this issue here.

@nisargrthakkar
Copy link

nisargrthakkar commented May 3, 2017

Hello @omidnavi @briman0094
I have also faced this error, after some workaround, I tried below steps and worked for me. Please check if this can help you as well.

  1. Latest RN setup. (react-native init project_name)
  2. npm install react-native-tcp@3.1.0 --save (and other command as specified, only thing is to use 3.1.0 version )
  3. update string-browserify and readable-stream to latest version
  4. Manually add stream module to node_modules.

@zelll
Copy link

zelll commented May 19, 2017

Try this:

npm install react-native-tcp@3.2.1 --save
npm install --save-dev rn-nodeify
node_modules/.bin/rn-nodeify --install stream,process,util --hack
npm install readable-stream@2.2.8 stream-browserify@2.0.1 --save

@viethaca
Copy link

viethaca commented Jun 20, 2017

@zelll it's worked for me when run debug.
When run release android, app has crashed

@omidnavy omidnavy closed this as completed Aug 8, 2017
@scriptfans
Copy link

same problem, how to fix it? thanks.

@omidnavy
Copy link
Author

@scriptfans check this answer :

Latest RN setup. (react-native init project_name)
npm install react-native-tcp@3.1.0 --save (and other command as specified, only thing is to use 3.1.0 version )
update string-browserify and readable-stream to latest version
Manually add stream module to node_modules.

if didnt work , check this one:

npm install react-native-tcp@3.2.1 --save
npm install --save-dev rn-nodeify
node_modules/.bin/rn-nodeify --install stream,process,util --hack
npm install readable-stream@2.2.8 stream-browserify@2.0.1 --save

@scriptfans
Copy link

@omidnavi Thanks very much. I solved it in another way, we can install the github version rn-nodeify to fix it:
"devDependencies": { "rn-nodeify": "mvayngrib/rn-nodeify" }

@shiyunsheng
Copy link

@viethaca please help me
it's worked for me when run debug.
When run release android, app has crashed
How did you solve it?

@shiyunsheng
Copy link

use the latest version .it's ok
npm install react-native-tcp --save
npm install --save rn-nodeify (no dev)
node_modules/.bin/rn-nodeify --install stream,process,util --hack
npm install readable-stream stream-browserify --save

@viethaca
Copy link

@shiyunsheng i use rn 0.48.4 and react-native-tcp 3.3.0 and in package.json add

"scripts":{
"postinstall": "rn-nodeify --install stream,process,util --hack",
}

@uriva
Copy link

uriva commented Jun 28, 2018

All the above not working for me. RN 0.55.4

@shiyunsheng
Copy link

@uriva use npm install readable-stream@2.2.8 stream-browserify@2.0.1 --save

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