Skip to content

TypeError: Cannot read property 'row' of undefined #14

@teckays

Description

@teckays
TypeError: Cannot read property 'row' of undefined
    at WriteStream.<anonymous> (/Users/.../node_modules/node-progress-bars/index.js:34:14)

This error is thrown when I have multiple iterations that exceeds the number of opened files allowed, EMFILE on mac.

reproduce:

const Progress = require('node-progress-bars')

const iterations = 15000
const prg = new Progress()
prg.total = iterations

for (let i = 0; i <= iterations; i++) {
  prg.tick()
}

result:

node test.js
 [▇▇▇▇▇▇—————————————————————————] 8783/15000 59% 11.9s 20.3s

for me it stops at around 8800

The error is not thrown in this example, for me it is thrown when I use it inside a Promise chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions