cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] npm shows spinner while waiting for password

Open jeffrson opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

Since version 10.7, when the "spinner" was introduced (I dislike it for various reasons, ugly flickering a.s.o., but wont discuss it here further since it's not related), the password prompt of npm login is misleading. Instead of waiting behind "Password:" it shows the spinner, indicating some "progress" that does not happen. Instead it's actually waiting for the password which has to be typed or inserted while according to the spinner npm seems busy. It appears as if the password prompt is skipped.

Expected Behavior

Clearly indicate that npm is waiting for the password to be entered.

Steps To Reproduce

Simply execute npm login, type some username. Enjoy :-/

Environment

  • npm: 10.8.1
  • Node.js: 20.14.0

jeffrson avatar Jun 03 '24 11:06 jeffrson

ux stands to be improved by not having a spinner at all

mcandre avatar Aug 27 '24 18:08 mcandre

The spinner is misleading and has led to plenty of confusion (example: https://github.com/verdaccio/verdaccio/issues/4897). Entering user, password, and email are input prompts requiring nothing but a blinking cursor. 🤷

PS: It might be a node problem since this is coming from here.

mbtools avatar Oct 23 '24 00:10 mbtools

While the spinner made me assume that something is broken, it's also weird that the email address isn't shown, even though it is public.

s-h-a-d-o-w avatar Oct 23 '24 01:10 s-h-a-d-o-w

Same issue... I've been waiting for 5minutes, thinking something would happen bc of the spinner. After finding this issue I simply pasted my password into the terminal and clicked "Enter" and was logged in.

OrRosenblatt avatar Oct 25 '24 17:10 OrRosenblatt

Who made such a bad design? And it hasn't been fixed in so long.

ZhangMingZhao1 avatar May 23 '25 09:05 ZhangMingZhao1

Still not fixed...

embostan avatar Aug 05 '25 18:08 embostan

Tip: commenting "Still not fixed" doesn’t help to fix it. See here to understand what’s going on.

bfontaine avatar Aug 26 '25 09:08 bfontaine

I concur! We just spent 10 minutes thinking it was probably trying to open a web browser for authorization in the background... The spinning icon clearly indicated that something was happening. It never occurred to us that system is idle and waiting for input - that we could type after the spinning wheel, especially since there was no indication of typed characters either.

Honestly, this has become one of the worst UI ideas I've ever encountered.

webdevelopers-eu avatar Sep 24 '25 05:09 webdevelopers-eu

The fix is in the queue but unfortunately not a priority. Requires a change in a related package.

https://github.com/npm/cli/pull/8322

mbtools avatar Sep 24 '25 13:09 mbtools

I spent 10 minutes googling around this, I'm lucky I came across this, please fix it really is a silly bug.

shahmhussain avatar Nov 03 '25 14:11 shahmhussain

Removing the spinner altogether would really help. Expected to be a small code change.

npm has a history of getting too fancy with console output, such as applying colors and other inappropriate sequences in non-tty contexts, creating all sorts of glitches.

mcandre avatar Nov 03 '25 18:11 mcandre

Still an issue. when I log in, even typing with the password the spinner is still persistent and I don’t get anything after that. Any fix?

ShahryarAhmed avatar Nov 03 '25 18:11 ShahryarAhmed

See #8322

mbtools avatar Nov 03 '25 22:11 mbtools