question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot read property 'length' of undefined

See original GitHub issue

Hi there, while trying out tsd-jsdoc on vis.js, I got the error mentioned in the title, at this location in the code:

for (let i = 0; i < o.members.length; ++i) {   // <== Cannot read property 'length' of undefined
  if (o.members[i].kind === 'constructor') {
    ctorObj = o.members[i] as dom.ConstructorDeclaration;
  }
}

There is no urgency to have this fixed, just trying it out. But could you supply me with a workaround to continue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
englercjcommented, May 30, 2018

Going to close this for now, and if it happens again we can fix it then.

0reactions
wimrijnderscommented, May 30, 2018

Totally agree! Good riddance to you, issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property Length of Undefined in JavaScript
Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong...
Read more >
Typeerror: Cannot Read Property 'length' of Undefined
A typeerror length of undefined can indicate that the actual type of an operand is different from the expected type. This error can...
Read more >
[SOLVED] Cannot Read Property 'length' of Undefined in JS
To fix the “cannot read property 'length' of undefined” error, perform an undefined check on the variable before accessing the length property ......
Read more >
Cannot read property length of undefined - Stack Overflow
The error means that what ever element is returned by getElementById('WallSearch') , it does not have a value property. Every form field has...
Read more >
TypeError: Cannot read property 'length' of Undefined in JS
The "Cannot read property 'length' of undefined" error occurs when accessing the length property on an undefined value. To solve the error, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found