Closed huutrancl closed 7 years ago
@mvayngrib As far as I understand, that "hack" has already been pushed to NPM?
I just npm install rn-nodeify and I can see that locally https://github.com/mvayngrib/rn-nodeify/commit/9917779ed9a461c6c43ba410b9f0bf6372c6f31a is already there.
Yet when I ran it on android in windows I still run into this issue? I mainly needed this so a dependency of my app does not break on me when it does require("crypto")
I am using react-native 0.32.1
For me, i only installed crypto, streams, events. because apparently crypto uses the other two.
@liuzhen2008 just to make sure, does that dep really need the crypto
module? If not, you may be able to just exclude crypto: https://github.com/facebook/react-native/commit/5710b230a2a0f2b29553fbf94af5147a2e030f44
@liuzhen2008 released rn-nodeify@7.0.1 with fix for windows by @mhofman: https://github.com/mvayngrib/rn-nodeify/commit/67642d26c08440a117971396c6a4ee3dc1c524b7
@mvayngrib Thanks. I will update rn-nodeify once i get home.
But to answer your first question. My react native application uses a "sockjs-node" module. And that module doesrequires("crypto")
at some point in its code.
Apparently I didn't need to use rn-nodeify on a Mac. Really odd.
@mvayngrib Just tested. The same error still occurs. same stack as @huutrancl posted
@liuzhen2008 hm, i've never tested on windows (are you using windows now?). Usually when errors persist it means i need to rerun the rn-nodeify script. For example after you npm i <something>
, you should re-run rn-nodeify. Hope it helps...
I'm also stuck at this error on Windows.
So I wonder how can I solve this error ? I occur this error now...
no answer for this issue ? i have this problem with react-native-tcp and react-native-crypto ! is there any solution ?
@omidnavi I have solved this problem, you can try to do this.
npm install readable-stream@latest stream-browserify@latest --save
@yreenchan Thanks for your response , could you please give me a complete walkthrough ?
@yreenchan Oh its not needed 👍 Everything is working now , Thank you , you made my day.
@omidnavi You're welcome !
I tried all the solutions suggested at https://github.com/mvayngrib/react-native-randombytes/issues/5 I did (react native > 0.29.0)
Now I can not import react-native-crypto.