npm adduser does not let me type password

triaged
cli
priority:medium

(Faraz Kaleem Malik) #1

What I Wanted to Do

I wanted to use the npm cli to sign in to my npmjs.com account to publish a package (Windows)

What Happened Instead

When I got onto the "Password: " phase, the cli would not let me type. I tried this initially from a VSCode terminal, and then from cmd.

Reproduction Steps

Run in terminal:
npm adduser
Username: number.isnan
Password: <cursor stuck here, no matter what I type>

Details

To generate the debug-log, I Ctrl-C ed after I tried typing password
The package I am creating as called “gocomics-api”

0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Users\2021158\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘adduser’ ]
2 info using npm@6.5.0
3 info using node@v8.11.4
4 verbose npm-session 50e443e276c748f2
5 verbose web login before first POST
6 http request → POST https://registry.npmjs.org/-/v1/login
7 http 401 ← Unauthorized (https://registry.npmjs.org/-/v1/login)
8 verbose web login not supported, trying couch
9 verbose stack Error: canceled
9 verbose stack at Interface. (C:\Users\2021158\AppData\Roaming\npm\node_modules\npm\node_modules\read\lib\read.js:66:13)
9 verbose stack at emitNone (events.js:106:13)
9 verbose stack at Interface.emit (events.js:208:7)
9 verbose stack at Interface._ttyWrite (readline.js:774:16)
9 verbose stack at ReadStream.onkeypress (readline.js:158:10)
9 verbose stack at emitTwo (events.js:126:13)
9 verbose stack at ReadStream.emit (events.js:214:7)
9 verbose stack at emitKeys (internal/readline.js:420:14)
9 verbose stack at emitKeys.next ()
9 verbose stack at ReadStream.onData (readline.js:1010:36)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at ReadStream.emit (events.js:211:7)
9 verbose stack at addChunk (_stream_readable.js:263:12)
9 verbose stack at readableAddChunk (_stream_readable.js:250:11)
9 verbose stack at ReadStream.Readable.push (_stream_readable.js:208:10)
9 verbose stack at TTY.onread (net.js:597:20)
10 verbose cwd c:\Users\2021158\OneDrive - Appleby College\U2\programs\node\gocomics-api
11 verbose Windows_NT 10.0.17134
12 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Users\2021158\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “adduser”
13 verbose node v8.11.4
14 verbose npm v6.5.0
15 error canceled
16 verbose exit [ 1, true ]

Platform Info

$ npm --versions
{ 'gocomics-api': '1.0.0',
  npm: '6.5.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.11.4',
  openssl: '1.0.2p',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }
$ node -p process.platform
win32