tty-table icon indicating copy to clipboard operation
tty-table copied to clipboard

RangeError: Invalid array length

Open nuhasha opened this issue 1 year ago • 1 comments

Problem Summary

node_modules/tty-table/src/format.js:172
            + Array(padBoth + 1 + padRemainder).join(" ")
              ^
RangeError: Invalid array length

  at /node_modules/tty-table/src/format.js:172:15
    at Array.map (<anonymous>)
    at module.exports.wrapCellText (/node_modules/tty-table/src/format.js:156:35)
    at module.exports.buildCell (/node_modules/tty-table/src/render.js:287:39)
    at /node_modules/tty-table/src/render.js:171:26
    at Array.map (<anonymous>)
    at module.exports.buildRow (/node_modules/tty-table/src/render.js:170:13)
    at /node_modules/tty-table/src/render.js:47:24
    at Array.map (<anonymous>)
    at module.exports.stringifyData (/node_modules/tty-table/src/render.js:46:45)

Node.js v18.17.1

Expected Result (screen shot if possible)

Actual Result (screen shot if possible)

Environment Information

The version of tty-table I use is: "tty-table": "^4.1.3"

  • OS:

  • Terminal Emulator:

  • Node Version:

Steps to Reproduce

  1. foo
  2. bar
  3. baz

nuhasha avatar Sep 14 '23 22:09 nuhasha

Hi @nuhasha. Could you please post the command you are using to invoke tty-table as well as the data you are passing to it?

tecfu avatar Oct 29 '23 19:10 tecfu