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

Running something like install-peerdeps -d postcss@^8.1.0 just gives me this output:

install-peerdeps v3.0.3
ERR Cannot read property 'forEach' of undefined

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nathanhleungcommented, Apr 13, 2021

Does there need to be an error in that case? If there’s no peer deps, then this module can nearly install the package requested and it’s done.

That’s a good point – maybe just a warning/info message since I’m guessing users who use install-peerdeps are generally intending/expecting extra peer deps to be installed?

1reaction
mojo2012commented, Apr 13, 2021

macOS: 11.2.3 (20D91) Node: v14.16.0 npm: 6.14.11

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Cannot read property 'forEach' of undefined
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 >
cannot read properties of undefined (reading 'foreach' ...
The "Cannot read property 'forEach' of undefined" error often occurs when trying to access an array index that doesn't exist [1][2]. This means...
Read more >
Cannot read property 'forEach' of undefined in angular ...
Cannot read property 'forEach' of undefined in angular object that is subscribed Hey guys. I have a subscribe method callback in my ngOnInit ......
Read more >
Error: Cannot read property 'forEach' of undefined #249
Migration unsuccessful Unexpected token C in JSON at position 0 Error: Cannot read property 'forEach' of undefined TypeError: Cannot read ...
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