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.

Cannot read property 'forEach' of undefined

See original GitHub issue

Hi Fernando,

It’s me again (with another problem again).

On my Dell laptop, I’ve got error message Cannot read property 'forEach' of undefined popping up when I am expanding (or refreshing) the solution from the treeview. This error message only appears when I am enabling your extension, and this error appears on any solution files.

As additional info, my laptop specs are Dell Latitude E6420:

  • 64-bit Windows 10
  • Intel Core i5-2520M - 2.50GHz (up to 3.20GHz with Turbo Boost mode enabled)
  • 4Gb of RAM
  • Develop the project using C# MVC ASP.Net, with lot ecmascript6 file (but saved as a *.js file extension) inside the solution.
  • The Solution file created using VS2017 Community Edition
  • VSCode v1.24.1
  • vscode-solution-explorer v0.2.29

I don’t know these error raised by invalid of my os configurations, hardware specs, or any else. I’ve tried to research on this problem, it seems (not sure) the problem is on VSCode core engine.

Can you help me with this problem?


P.S:

  • This message never appears on my Lenovo laptops.
  • Sorry for my bad English.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ababilonecommented, Oct 17, 2018

Hi,

I had the same issue before I realize that I had in my solution a project with an empty ItemGroup.

Looks like CpsProject.parseDocument is not protected for that.

Error has gone once I have removed the empty ItemGroup.

Hope this help.

2reactions
fadhly-permatacommented, Jul 26, 2018

Hi Fernando,

FYI, after updating your latest version (0.2.32) the error message not popping up anymore. Have you fixed this problem? If so, you can close my issue 😃

Thank you very much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'forEach' of undefined - Stack Overflow
And undefined has no forEach method. To fix this, always make sure you put a semicolon at the end of your lines (or...
Read more >
TypeError: Cannot read property 'forEach' of Undefined in JS
The "Cannot read property 'forEach' of undefined" error occurs when the forEach() method is called on an undefined value. To solve the error,...
Read more >
[AskJS] Why does this simple forEach give error Cannot read ...
But the following code gives an error script.js?v=3:196 Uncaught TypeError: Cannot read property 'forEach' of undefined :
Read more >
TypeError: Cannot read property 'forEach' of undefined #490
That is an error that merely comes because something is undefined and then .forEach is getting called on it. We need to know...
Read more >
typeerror: cannot read properties of undefined (reading 'foreach')
Your problem is that you are trying to loop though the data object which is not a array. You can only use the...
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