Closed hughsk closed 5 years ago
Perhaps the best solution is to replace
getpass
with a package that works in Windows and Node v10?
Do you know of one?
It looks like NPM uses the read package with the silent: true
option – though this has its own problems, e.g. npm/read#34. Still, less bad than not working at all with Node 10!
This uses mute-stream to do the interesting part, i.e. reading the password without echoing it.
Running
flourish login
breaks before it has the chance to send a login request to the server:The error appears to be coming from the
getpass
package: thertty
stream emits an error the tick after it is closed.This behavior only seems to be occurring for me when using Node v10 -- switching to Node v8 works around the issue. This makes me suspect that it's related to this bug in Node: https://github.com/nodejs/node/issues/22814
I also don't believe the
getpass
package works on Windows due to its reliance on/dev/tty
instead ofprocess.stdin
andprocess.stdout
. Perhaps the best solution is to replacegetpass
with a package that works in Windows and Node v10?Thanks! :)