Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`npm install` Output On Jenkins

Not a huge issue, but I've noticed that npm install output on Jenkins comes out a bit weird.

Originally it was an issue with having colors set:

 ** [out :: 96.126.118.103] [37m
 ** [out :: 96.126.118.103] [40m
 ** [out :: 96.126.118.103] npm
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] [32m
 ** [out :: 96.126.118.103] [40m
 ** [out :: 96.126.118.103] http
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] [35m
 ** [out :: 96.126.118.103] GET
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] https://registry.npmjs.org/coffee-script
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] [37m
 ** [out :: 96.126.118.103] [40m
 ** [out :: 96.126.118.103] npm
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] [32m
 ** [out :: 96.126.118.103] [40m
 ** [out :: 96.126.118.103] http
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] [35m
 ** [out :: 96.126.118.103] GET
 ** [out :: 96.126.118.103] [0m
 ** [out :: 96.126.118.103] https://registry.npmjs.org/mongoose

After removing the colors it cleaned up the output pretty well (npm config set color false). Unfortunately it is still adding a line break between names:

 ** [out :: 96.126.118.103] npm
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] http
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] GET
 ** [out :: 96.126.118.103] https://registry.npmjs.org/stylish
 ** [out :: 96.126.118.103] npm
 ** [out :: 96.126.118.103] 
 ** [out :: 96.126.118.103] http
 ** [out :: 96.126.118.103] GET https://registry.npmjs.org/coffee-script

Is there any way of forcing these lines to be how they usually display? Similar to how it's normally displayed in the console:

npm http GET https://registry.npmjs.org/mongoose
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/coffee-script

It isn't a huge deal, but it does make troubleshooting npm installs a bit harder than it should be when issues arise.

Any suggestions?

like image 526
AlbertEngelB Avatar asked Apr 07 '14 20:04

AlbertEngelB


1 Answers

Install the AnsiColor plugin, that should solve it.

like image 112
Shay Erlichmen Avatar answered Oct 29 '22 10:10

Shay Erlichmen