How to disable npm's progress bar

24,626

Solution 1

Add the following to a file called .npmrc in your project root folder:

progress=false

It is also possible to place this file in your home directory: ~/.npmrc

Learn more about NPM config.

You can also do this on the command line:

npm install --no-progress

Solution 2

in the later version of npm you can use

npm install --no-progress

see https://docs.npmjs.com/misc/config#progress

Solution 3

While the op's and selected answer probably work well, my issue was different : some build steps in package.json explicitely included --progress, which was just making my Jenkins builds slow and ugly.

I removed those with a simple sed before executing npm install :
sed -i 's#--progress##g' package.json

Of course, if I had had write access to, it might have been better to remove the --progress argument directly from the sources files.


Anyway, I hope it will help.

Share:
24,626
Jeanluca Scaljeri
Author by

Jeanluca Scaljeri

Updated on July 09, 2022

Comments

  • Jeanluca Scaljeri
    Jeanluca Scaljeri almost 2 years

    As pointed out here the progress bar of npm slows down the whole installation progress significantly. The solution given is to disable it

    $> npm set progress=false && npm install
    

    The question I have, is it possible inside a project to set something (in package.json for example) such that I can omit progress=false on the command line and simply can do $> npm install and obtain the same result as above?