Closed ghost closed 7 years ago
@purrado make sure to use the names of the node core modules, not the shims themselves, i.e.: rn-nodeify --install ...,crypto,
and NOT rn-nodeify --install ...,react-native-crypto,
@mvayngrib That did the trick! I remember trying it for randombytes
but it threw an error (allShims[name]
is undefined) so I just assumed it wouldn't work for crypto
. Looked carelessly through the code and found allShims
are imported from ./shims.js
so I just assumed that the entries there would work. I should have looked at ./coreList.js
, I think. Anyway, thank you so much! 😄
@purrado you're very welcome, glad you got it working :)
I keep getting this error after trying to run the app:
Here's my
postinstall
script:rn-nodeify --install buffer,events,react-native-crypto,react-native-randombytes,stream,util,vm --hack
And here are the
react-native
andbrowser
fields:Here's the
shim.js
generated:It might also be worth noting that the
"crypto": "react-native-crypto"
entries on thereact-native
&browser
fields onpackage.json
weren't generated automatically. I had to manually add them.The weird thing is that it worked a couple of times (twice, to be exact). But when my modules changed and I had to
npm install
again it just won't run anymore. I wonder what's wrong. Any help would be appreciated!rn-nodeify
version:7.0.1
npm
version:5.3.0
react-native
version:0.46.3