cli-table / cli-table3

Pretty unicode tables for the command line
MIT License
535 stars 44 forks source link

Ugly output #190

Closed songz closed 3 years ago

songz commented 3 years ago

Why do I get such ugly output?

Using: Ubuntu 16.04 Tmux: 2.1 Env: ssh user@prodenv

Screen Shot 2020-11-07 at 8 29 15 AM

My technical skills has reached a limit and I don't know how to solve this issue, any tips / pointers in the right direction to configure my setup correctly is all I need.

Help is appreciated!

mikeerickson commented 3 years ago

Can you supply the code you are using to generate this output so we can see what are causing issues

songz commented 3 years ago

the code I'm using is literally the given.

var Table = require('cli-table3');

// instantiate
var table = new Table({
    head: ['TH 1 label', 'TH 2 label']
  , colWidths: [100, 200]
});

// table is an Array, so you can `push`, `unshift`, `splice` and friends
table.push(
    ['First value', 'Second value']
  , ['First value', 'Second value']
);

console.log(table.toString());

I'm not even sure where to start debugging. Works well on my mac though, so must be my system setup. I don't know what setup I should be looking into to fix this.

mikeerickson commented 3 years ago

Yep, code looks fine and the fact that it works on Mac leads one to believe it must be some setup issue. I don’t have have Linux setup anywhere to test myself.

Curious if it is a tmux issue? Can you test without it?

songz commented 3 years ago

@mikeerickson You are absolutely right!

Upgraded my tmux to tmux next-3.3 and it worked! followed this tutorial: https://github.com/tmux/tmux

Googled a few errors, and everything loooks good now. thank you.