tradle / rn-nodeify

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

Object prototype may only be an Object or null #43

Closed AdorkDean closed 6 years ago

AdorkDean commented 7 years ago

Hi, I'm trying to use rn-nodeify & webtorrent on react native, but webtorrent is still not working. Do you have a working example of that? Thanks!

ghost commented 7 years ago

I'm getting the same error on Windows using an Android device emulator. Works for Android on Mac, though. Here's a few lines from the stack trace:

Object prototype may only be an Object or null.
inherits
    ..\node_modules\inherits\inherits_browser.js:5:35
<unknown>
    ..\node_modules\readable-stream\lib\_stream_readable.js:52:14
AdorkDean commented 7 years ago

@purrado when i used 'ReactNativify', webtorrent can built well on react-native. But, webtorrent cannot download torrent.

deblasis commented 7 years ago

Same issue here: https://github.com/StanScates/react-native-jwt/issues/6

It seems to be related to the circular references hacks being used in browserify with stream

I tried to update stream-browserify and readable-stream as suggested by someone but it didn't work.

mvayngrib commented 7 years ago

@AdorkableDean see #21 for a workaround. Try installing from rn-nodeify from github rather than npm.

AdorkDean commented 7 years ago

@mvayngrib build ok when use from github.

mvayngrib commented 6 years ago

closing, as the workaround is now part of the published version