tradle / rn-nodeify

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

process.version.slice - undefined is not an object #67

Open rares-lupascu opened 6 years ago

rares-lupascu commented 6 years ago

i tried to installed stream: rn-nodeify --install stream --hack

the bundle gets created but ... i get the error in the title from: node_modules/readable-stream/lib/_stream_writable.js 57:80

any idea how to bypass this? :)

thanks

curtismenmuir commented 5 years ago

Seen similar issue, fixed with: rn-nodeify --install stream,process --hack

ripzery commented 4 years ago

@curtismenmuir Still not working

SpicyPete commented 4 years ago

Also running into this issue recently, but haven't dug deep into it yet.

oeudoyeh commented 4 years ago

has anyone been able to fix this please

kd-s-t commented 3 years ago

this did not work on me rn-nodeify --install stream,process --hack

dekameron22 commented 3 years ago

+1

hinciler commented 2 years ago

Is there anyone else other solution? I couldn't fix this issue.

Frostswing commented 1 year ago

Anyone have found a solution?

The issue is found at: "\node_modules\concat-stream\node_modules\readable-stream\lib_stream_writeable.js"

'use strict';

/*<replacement>*/

var pna = require('process-nextick-args');
/*</replacement>*/

module.exports = Writable;

/* <replacement> */
function WriteReq(chunk, encoding, cb) {
  this.chunk = chunk;
  this.encoding = encoding;
  this.callback = cb;
  this.next = null;
}

// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
  var _this = this;

  this.next = null;
  this.entry = null;
  this.finish = function () {
    onCorkedFinish(_this, state);
  };
}
/* </replacement> */

/*<replacement>*/
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
/*</replacement>*/
Frostswing commented 1 year ago

I think i have found a solution for this error here: https://github.com/nodejs/readable-stream/issues/313