Comments (11)
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 verbose
logging (which was shown erroneously, regardless of loglevel). If you want to see the logging messages you can use --verbose
.
from cli.
Those are good suggestions. To take them point by point:
- There is a way to hide the cursor which should be easy enough to do only when the spinner is visible. I will look into this and any accessibility implications it might have.
- I'd be interested in seeing benchmarks if you have any from before and now. Also if you run with
--no-progress
do you still see a performance impact? - The reason we moved away from how it used to work is that the progress bar showed messages that were primarily intended for logging. They weren't tailored for usability and would often show the last completed action when the current running action was hanging which led to lots of confusion. I'm in favor of bringing something similar back but we'd first need to put all the events in place in Arborist to accurately indicate what's happening in a user-friendly manner. But that will take more time.
Im going to log these in our follow up status board issue. Thanks for taking the time to provide these feedback!
from cli.
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
from cli.
@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.
Is this total silence a temporary problem? Are you going to add back some kind of progress bar in later version?
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.
from cli.
Yes it is temporary.
from cli.
I thought something was broken
Same here, so I interrupted my npm update -gs
command and then something actually was broken. As in my entire NPM install. I had to note down my global packages by looking at the contents of the install directory, then uninstall and reinstall node with NVM and install all of my stuff again.
Not a huge disaster, but definitely not great either.
So word to the wise: don't interrupt it when you have the -g
flag, because you will probably break your NPM 😓
from cli.
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.
from cli.
@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:
- The spinner is there as expected, but there's a constant blinking cursor overlapping with it and it looks a bit unfinished or buggy.
- The installation process seems slower. I could revert to 10.5.2 and time the installations to see what the difference is.
- The spinner is not enough as default information. In previous versions I really liked the way it informed the user about what was currently doing, for example during
npm install
, so I would very much like to see something of the sort:
\ install [email protected]
| install [email protected]
/ install [email protected]
- update [email protected]
\ update [email protected]
| reify etc...
Wouldn't that be nicer?
from cli.
You can get what you described by setting your log level to http
, those were the logging messages "leaking" into the progress bar before.
from cli.
@wraithgar I've tried npm install --loglevel http
and I get a long running list with the package downloads (http fetch), which is not bad per se, but I'd like to see what is actually being installed and also other activities being performed, not only what is being downloaded (or found in cache); all of this preferably in one single progress line (the previous action needs to be overwritten to the same line), similar to how it was before in 10.5.2.
from cli.
2. I'd be interested in seeing benchmarks if you have any from before and now. Also if you run with `--no-progress` do you still see a performance impact?
I've run several benchmarks on a certain package (react frontend app) and the difference is not so large:
npm 10.5.2: npm install
finished in 1:10
npm 10.7.0: npm install
finished in 1:07
npm 10.7.0: npm install --no-progress
finished in 0:59
3. The reason we moved away from how it used to work is that the progress bar showed messages that were primarily intended for logging. They weren't tailored for usability and would often show the last completed action when the current running action was hanging which led to lots of confusion. I'm in favor of bringing something similar back but we'd first need to put all the events in place in Arborist to accurately indicate what's happening in a user-friendly manner. But that will take more time.
I'd very much like to see a user-friendly manner of displaying the currently performed action with npm install
, I posted more details in my comment above to @wraithgar
Im going to log these in our follow up status board issue. Thanks for taking the time to provide these feedback!
Thank you @lukekarrys @wraithgar for your quick and constructive responses!
from cli.
Related Issues (20)
- Npm install HOT 7
- Install Progress
- Progress bar HOT 1
- [BUG] "npm publish" tags pre-versions as "latest" HOT 8
- [BUG] `npm` doesn't correctly resolve workspaces when defining a dependency using GitHub URLs HOT 6
- [BUG] Failed index access on utils/tar.js while trying to publish a package with node_modules HOT 3
- [BUG] npm pack in 10.5.0 introduces breaking change due to changed output HOT 4
- [BUG] dist-tag in package.json not re-evaluated HOT 1
- [BUG] #7495 Partially fixes #7413, but running scripts for workspaces in the / directoy is still broken. HOT 2
- [BUG] can't install HOT 4
- [BUG] Fsevents hanging HOT 3
- [BUG] <EACCES permissions errors when installing packages, npm is trying to use /.npm as its cache directory, which typically requires root permission > HOT 4
- [BUG] `npm outdated` no longer respects semver range for `npm:` style indirect versions HOT 1
- [BUG] How do I know that which version of nodeJS and npm are using a mern stack project HOT 2
- [BUG] `npm ci` doesn't properly compare `package.json` with `package-lock.json` HOT 1
- [BUG] If the project name is node_modules, this error will be reported HOT 1
- [BUG] npm shows spinner while waiting for password
- [BUG] "There appears to be trouble with your network connection. Retrying..."
- [BUG] "There appears to be trouble with your network connection. Retrying..." HOT 2
- [Feature request] Support overriding `main`, `exports` and other package.json fields with `publishConfig` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.