Jeanluca Scaljeri
Jeanluca Scaljeri

Reputation: 29129

How to disable npm's progress bar

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?

Upvotes: 45

Views: 35962

Answers (3)

MrWillihog
MrWillihog

Reputation: 2646

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

Upvotes: 77

ShoeLace
ShoeLace

Reputation: 3576

in the later version of npm you can use

npm install --no-progress

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

Upvotes: 26

Balmipour
Balmipour

Reputation: 3055

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.

Upvotes: 6

Related Questions