Blog of Raivo Laanemets

Make npm 3 play nice with Watch


The npm package manager has a progress bar that sometimes confuses other tools. Many of my recent projects use npm as a build tool. Watch is a periodic execution utility and I have used it with Makefiles to rebuild bundles during development. When I attempted to use it with npm, the output started to drift away, line by line. Debugging took me to npm's GitHub issues list where I found that this could be caused by the progress bar. The bar itself was not visible for me. The bar can be disabled but it is not well documented how to do it.

The solution is linked from this issue and is simply (works only in a recent npm 3 version!):

npm config set progress false

That will disable the progress bar and makes the Watch output not drift away anymore.


Comments

No comments have been added so far.

Email is not displayed anywhere.
URLs (max 3) starting with http:// or https:// can be used. Use @Name to mention someone.