You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tty.js -> RangeError [ERR_INVALID_FD]: "fd" must be a positive integer: [object Object] #28590
tty.js:44
throw new ERR_INVALID_FD(fd);
^
RangeError [ERR_INVALID_FD]: "fd" must be a positive integer: [object Object]
at new ReadStream (tty.js:44:11)
at Object.<anonymous> (/Users/alex/codes/ores/bunion/dist/cli.js:322:14)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
at internal/main/run_main_module.js:21:11
I can't figure out why. The fd from the open() call is a positive integer.
It's also, of course, a little suboptimal to have [object Object] instead of an inspected object, so at the very least that's a bug/improvement to make.
Yeah but according to the TypeScript types, there is an options object, that should take {fd:fd}, here is a link to it: node_modules/@types/node/base.d.ts
Also, if setRawMode(true) does not return the instance (this), should I file a ticket for that and do you know where that call is? I would like to patch that.
@ORESoftware That’s an issue with the TypeScript then, so yeah, moving is a good idea :)
Also, if setRawMode(true) does not return the instance (this), should I file a ticket for that and do you know where that call is? I would like to patch that.
Activity
addaleax commentedon Jul 7, 2019
const strm = new ReadStream(fd);without the{...}should help :)ORESoftware commentedon Jul 7, 2019
Yeah but according to the TypeScript types, there is an options object, that should take
{fd:fd}, here is a link to it:node_modules/@types/node/base.d.tsAlso, if
setRawMode(true)does not return the instance (this), should I file a ticket for that and do you know where that call is? I would like to patch that.ORESoftware commentedon Jul 7, 2019
yeah so it's just that the TS typings are off, so I should just move this to TS github repo huh
addaleax commentedon Jul 7, 2019
@ORESoftware That’s an issue with the TypeScript then, so yeah, moving is a good idea :)
It does, since 1f4d4c0, i.e. since 10.12.0 :)
ORESoftware commentedon Jul 7, 2019
ok cool, will close thanks