Open xxnatc opened 8 years ago
i have the same trouble .i update node version and still not work
$ stream-adventure C:\Users\Windows 8.1\AppData\Roaming\npm\node_modules\stream-adventure\node_modules\adventure\lib\menu.js:51 process.stdin.setRawMode(true); ^
TypeError: process.stdin.setRawMode is not a function
at module.exports (C:\Users\Windows 8.1\AppData\Roaming\npm\node_modules\stream-adventure\node_modules\adventure\lib\menu.js:51:19)
at Shop.showMenu (C:\Users\Windows 8.1\AppData\Roaming\npm\node_modules\stream-adventure\node_modules\adventure\index.js:267:16)
at Shop.execute (C:\Users\Windows 8.1\AppData\Roaming\npm\node_modules\stream-adventure\node_modules\adventure\index.js:131:14)
at Object.
node do not detect that you are running code inside tty.
When Node.js detects that it is being run inside a TTY context, then process.stdin will be a tty.ReadStream instance and process.stdout will be a tty.WriteStream instance. The preferred way to check if Node.js is being run in a TTY context is to check process.stdout.isTTY:
$ node -p -e "Boolean(process.stdout.isTTY)"
true
$ node -p -e "Boolean(process.stdout.isTTY)" | cat
false
if result is false, try to use cmd
to start.
ths i try $ node -p -e "Boolean(process.stdout.isTTY)" return fasle so i use cmd to start it success
@xxnatc @Jim-MK Can you confirm if this was solved in recent node versions?
Got
stream-adventure
to install, but when I try to run it I get this error:I'm on Win 10 with node v4.2.4. There is a similar issue (#38) but my node version should be supported.