-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[BUG] npm 10.6.0 doesn't log anything while npm install #7425
Comments
The progress bar in npm has been temporarily removed. It was conflicting with logging output and was generally inaccessible. What you are used to seeing is a mix of the progress bar and |
@wraithgar I would prefer seeing some kind of progress log while npm is actually performing some work, by default. Otherwise users might confuse the silence with the process being stalled or hanging or a bug or something. Sometimes an npm install on a large project may take several minutes. Something should be displayed (some sort of spinner, progress bar, etc) while doing work that take longer than, say, 5 seconds. I had to revert to 10.5.2 because this was very strange, not showing anything for long periods of time - I thought something was broken. |
Yes it is temporary. |
Same here, so I interrupted my Not a huge disaster, but definitely not great either. So word to the wise: don't interrupt it when you have the |
We'll keep this open until we land a new "npm is actually doing something" visual. It probably won't be a progress bar initially but a simple spinner. |
Closes #7425 This is a little hard to test because everything should continue to work without progress, as evidenced by the lack of churn in the tests and snapshots here. The only existing tests that changed are the addition of newlines after prompts which is new behavior as part of this PR. I resorted to manually running some commands to get an idea of how the various states worked together: **`node . exec -- npm@4`** This should show progress at the start and then hide it as it prompts the user to install `npm@4`. `Ctrl+C` should exit from the prompt and the error should display on the next line (this is a current bug). **`node . audit signatures --loglevel=http`** This should show a lot of http log messages while always keeping the spinner on the last line of output. The spinner also should not jump between frames regardless of how quickly the log messages show up. **`node . pack`** This should immediately show the banners and output from `prepack` and not show the spinner until the actual packing is happening. **`node . login`** The spinner should never while the prompt is being displayed. **`node . view npm`** The spinner should appear while data is being fetched and then disappear for the rest of the command as output is being displayed. The end output on completion should not have any spinner frames rendered on new lines in the output. The old progress bar achieved this by calling `npmlog.disableProgress()` but now it is able to hide the spinner appropriately even while outputting individual lines to stdout.
@lukekarrys @wraithgar Thanks for taking the time to add the spinner! However, this could be improved upon, compared to how it was before in 10.5.2. My concerns are the following:
Wouldn't that be nicer? |
Those are good suggestions. To take them point by point:
Im going to log these in our follow up status board issue. Thanks for taking the time to provide these feedback! |
You can get what you described by setting your log level to |
@wraithgar I've tried |
I've run several benchmarks on a certain package (react frontend app) and the difference is not so large:
I'd very much like to see a user-friendly manner of displaying the currently performed action with
Thank you @lukekarrys @wraithgar for your quick and constructive responses! |
you should at least warn users who don't usually read docs or issues about the removal of something as iconic and important as a progress indication, why not at least copy what pnpm has achieved, which is a very clean and informative enough approach? a spinner is like a joke |
One thing to add is that nothing shows when you use the |
This update also coincides with this spinner getting stuck at times giving no info at all where. I thought npm is broken glad to see it was just a bad decision. |
progress bar was better |
let's just stop using this crap, PNPM is mopping the floor with NPM, it's about time it replaces it as the default installer. NPM is the same as Safari on Mac or Edge on Windows: a medium to install the real software you're going to use. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
The latest npm 10.6.0 doesn't log anything while installing the packages with
npm install
. It only prints the final results. So npm is working for almost 50 seconds without notifying the user whether it is doing anything at all. The behavior is similar tonpm install --loglevel silent
of the previous version 10.5.2.Expected Behavior
The logging should be displayed, showing the user that the installation is proceeding. It shouldn't be silenced completely.
Steps To Reproduce
npm install
with an existing package.json in the root directoryEnvironment
; copy and paste output from `npm config ls` here
The text was updated successfully, but these errors were encountered: