Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.stdin.setRawMode is undefined #2160

Closed
sabrehagen opened this issue Jul 10, 2015 · 2 comments
Closed

process.stdin.setRawMode is undefined #2160

sabrehagen opened this issue Jul 10, 2015 · 2 comments
Labels
process Issues and PRs related to the process subsystem.

Comments

@sabrehagen
Copy link

In io.js 2.3.3 process.stdin.setRawMode is not a defined function. The docs here contradict this: https://iojs.org/api/tty.html#tty_tty_setrawmode_mode

When trying to use tty.setRawMode(true) the following message is received:
(node) tty.setRawMode is deprecated. Use process.stdin.setRawMode instead.

This means stdin can only be used in buffered mode, the ability to create 'keypress' events as recreated by @TooTallNate is not possible without this.

@mscdex mscdex added the process Issues and PRs related to the process subsystem. label Jul 10, 2015
@silverwind
Copy link
Contributor

I'm using it in my modules, and it certainly is defined. Does process.stdin.isTTY evaluate to true in your case?

> process.stdin.setRawMode
[Function]

@sabrehagen
Copy link
Author

No matter what version of io.js or node.js I used this morning, this wasn't working. Now running this code again, it is working. Maybe it was something to do with my terminal configuration. This is working fine for me now, sorry for the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process Issues and PRs related to the process subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants