Coder Social home page Coder Social logo

Comments (6)

norfair00 avatar norfair00 commented on May 24, 2024

I have this error
code from https://github.com/gajus/table/blob/master/.SANDBOX/test-streaming.js

/home/n00/sbots/steambot_slave/node_modules/table/dist/drawBorder.js:20
  const columns = columnSizeIndex.map(size => {
                                  ^

TypeError: columnSizeIndex.map is not a function
    at drawBorder (/home/n00/sbots/steambot_slave/node_modules/table/dist/drawBorder.js:20:35)
    at drawBorderTop (/home/n00/sbots/steambot_slave/node_modules/table/dist/drawBorder.js:41:10)
    at create (/home/n00/sbots/steambot_slave/node_modules/table/dist/createStream.js:85:43)
    at Object.write (/home/n00/sbots/steambot_slave/node_modules/table/dist/createStream.js:151:16)
    at Timeout.setInterval [as _onTimeout] (/home/n00/sbots/steambot_slave/slave.js:29:12)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:267:5)
```

from table.

 avatar commented on May 24, 2024

I have the same error with the code from README.md:

const { createStream } = require("table")

let config, stream

config = {
  columnDefault: {
    width: 50
  },
  columnCount: 1
}

stream = createStream(config)

setInterval(() => {
  stream.write([new Date()])
}, 500)

Output:

maxblock@mbp t3 $ node index.js
/Users/maxblock/projects/tmp/t3/node_modules/table/dist/drawBorder.js:20
  const columns = columnSizeIndex.map(size => {
                                  ^

TypeError: columnSizeIndex.map is not a function
    at drawBorder (/Users/maxblock/projects/tmp/t3/node_modules/table/dist/drawBorder.js:20:35)
    at drawBorderTop (/Users/maxblock/projects/tmp/t3/node_modules/table/dist/drawBorder.js:41:10)
    at create (/Users/maxblock/projects/tmp/t3/node_modules/table/dist/createStream.js:85:43)
    at Object.write (/Users/maxblock/projects/tmp/t3/node_modules/table/dist/createStream.js:151:16)
    at Timeout.setInterval [as _onTimeout] (/Users/maxblock/projects/tmp/t3/index.js:15:10)
    at ontimeout (timers.js:466:11)
    at tryOnTimeout (timers.js:304:5)
    at Timer.listOnTimeout (timers.js:267:5)

Node: v9.9.0, table: 4.0.3

from table.

svarkey avatar svarkey commented on May 24, 2024

Reverted to [email protected] and the problem is gone

from table.

gajus avatar gajus commented on May 24, 2024

It is open-source package. I don't have resources to inspect this issue at the moment. However, PR would be welcome.

from table.

steveooo9 avatar steveooo9 commented on May 24, 2024

@gajus This PR seems to work. Could you quickly merge this PR fix and publish a new version?

from table.

gajus avatar gajus commented on May 24, 2024

๐ŸŽ‰ This issue has been resolved in version 5.0.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

from table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.