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.

TypeError: cannot ready property 'errorCount' of undefined

See original GitHub issue

Description

Happens on Windows 10 version 1909 when running solhint as a local dependency installed with yarn 1.22.4.

Happens in both PowerShell and Git’s Mingw64.

Annotation 2020-07-26 163533

Steps to Reproduce

  1. Clone https://github.com/paulrberg/solidity-template
  2. Install dependencies with yarn
  3. Run yarn lint:sol

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aspierscommented, Nov 26, 2021

I found the problem - my .solhintignore file was causing all the input files to be ignored, in which case, reports ends up being [], therefore reports[0] is obviously undefined. So the bug is in the line 97 above incorrectly assuming that reports will always be non-empty. Yet another case of the billion dollar mistake

1reaction
paulrbergcommented, Aug 5, 2020

Haha, it’s temporary! My Mac had a hardware fault and I left it at the repair store.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
What Causes TypeError: Cannot Read Property of Undefined ... Undefined means that a variable has been declared but has not been assigned a...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
How to Avoid the Infamous "Cannot read properties of ... - Bitovi
That error message is telling you the function is returning undefined implicitly, but its return type does not include undefined in it. Awesome!...
Read more >
Cannot read properties of undefined (reading 'length') - TrackJS
This error can be thrown for a lot of reasons, as it is incredibly common to reference the length property of string or...
Read more >
Error: Cannot read property 'count' of undefined. Databinding ...
Error : Cannot read property 'count' of undefined. Databinding Web API Angular 2 ; ngOnInit() { ; this.selectOptions = { persistSelection: true };....
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