"can't set raw mode on non-tty" when adding username
dangolant-salesforce opened this issue · 7 comments
When I run jira
and try to input my username, I get back the error:
(node) tty.setRawMode is deprecated. Use process.stdin.setRawMode instead.
tty.js:20
throw new Error('can\'t set raw mode on non-tty');
^
Error: can't set raw mode on non-tty
at Object.<anonymous> ( tty.js:20:11)
at Object.deprecated ( internal/util.js:55:15)
at setRawMode (C:\Users\dgolant\AppData\Roaming\nvm\v4.4.5\node_modules\jira-cmd\node_modules\commander\ index.js:945:11)
at Command.password (C:\Users\dgolant\AppData\Roaming\nvm\v4.4.5\node_modules\jira-cmd\node_modules\comm ander\index.js:948:3)
at Object.Auth.ask (C:\Users\dgolant\AppData\Roaming\nvm\v4.4.5\node_modules\j ira-cmd\lib\auth.js:36:17)
at C:\Users\dgolant\AppData\Roaming\nvm\v4.4.5\node_modules\jira-cmd\lib\auth. js:70:18
at C:\Users\dgolant\AppData\Roaming\nvm\v4.4.5\node_modules\jira-cmd\lib\auth. js:46:13
at Socket.<anonymous> (C:\Users\dgolant\AppData\Roaming\nvm\v4.4.5\node_modules\jira-cmd\node_modules\co mmander\index.js:830:5)
at Socket.g ( events.js:260:16)
at emitOne ( events.js:77:13)
Hi @dangolant-salesforce! I will try to have a look into this. This is happening under windows, right? Which terminal emulator are you using?
I tried in Git Bash and standard CMD. I tried to fix it, but couldn't find where it occurs, it looks like there's a deprecated method being used.
@blackbetty Probably it is. I didn't use it for a while (node 0.10)
Hi,
I have exactly the same issue when I tried to run it today.
I am on windows using cygwin.
Any ideas why this is occurring ?
Thanks,
Fergal.
I also had this issue.
The error is inside commander with the section of code ...
function setRawMode(mode) {
if (process.stdin.setRawMode) {
process.stdin.setRawMode(mode);
} else {
tty.setRawMode(mode);
}
};
setRawMode(true);
I am using node 6.9.0, and it seems neither process.stdin (which is a Reader) and tty have setRawMode
anymore. It was removed from both.
Currently jira-cmd is using commander version 1.1.1, but the latest version is 2.9.0. So I believe the solution might be to update to a more recent version of commander.
Swapping in Commander 2.9.0 doesn't quite solve it:
TypeError: program.prompt is not a function
at Object.ask (/Users/timborn/node.js/jira-cmd/jira-cmd/lib/auth.js:44:17)
at Object.setConfig (/Users/timborn/node.js/jira-cmd/jira-cmd/lib/auth.js:64:14)
at /Users/timborn/node.js/jira-cmd/jira-cmd/bin/jira.js:270:10
at Object.execCb (/Users/timborn/node.js/jira-cmd/jira-cmd/node_modules/requirejs/bin/r.js:1941:33)
at Module.check (/Users/timborn/node.js/jira-cmd/jira-cmd/node_modules/requirejs/bin/r.js:1116:51)
at Module.enable (/Users/timborn/node.js/jira-cmd/jira-cmd/node_modules/requirejs/bin/r.js:1428:22)
at Module.init (/Users/timborn/node.js/jira-cmd/jira-cmd/node_modules/requirejs/bin/r.js:1034:26)
at Timeout._onTimeout (/Users/timborn/node.js/jira-cmd/jira-cmd/node_modules/requirejs/bin/r.js:1704:36)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
If you are still facing the issue please feel free to reopen the issue, and we'll solve it together : ) .