tradle / rn-nodeify

hack to allow react-native projects to use node core modules, and npm modules that use them
MIT License
614 stars 114 forks source link

Unable to resolve module stream #106

Open hsnGh67 opened 3 years ago

hsnGh67 commented 3 years ago

I am trying to use @walletconnect/client in RN 0.64.2. I followed the docs , but I am facing this error

Screenshot 2021-06-27 115740

JonasHiltl commented 2 years ago

Do you have stream added to your postinstall script? Like below:

"postinstall": "rn-nodeify --install fs,util,process,path,events,stream --hack"

You could also manually run rn-nodeify --install "stream" --hack

vietnamese-chowder commented 2 years ago

I have the exact same issue. My postinstall script calls

yarn rn-nodeify --install 'crypto,os,buffer,react-native-randombytes,vm,stream,http,https,url,net,fs,zlib' --hack --yarn

And it affects not only stream in cipher-base but also http in https-browserify. I have to manually edit their respective package.json's to make it work. What's also weird is that these don't always occur, but most of the time they do.

react-native: 0.68.0 rn-nodeify: ^10.3.0 https-browserify: 0.0.1