# TypeError: Cannot read property 'forEach' of undefined

**URL:** <https://discourse.nodered.org/t/typeerror-cannot-read-property-foreach-of-undefined/47953>\
**Category:** General\
**Created:** [2 July 2021 18:34 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-foreach-of-undefined/47953 "2021-07-02T18:34:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [2 July 2021 23:43 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-foreach-of-undefined/47953/3 "2021-07-02T23:43:51Z")

</div>

Did you edit settings.js? If so, check to see if you missed a comma or a bracket.  
If you can't find an error and haven't added anything that could comprimize your security, you could edit the file and copy it and paste it to a reply.

In order to make code more readable and importable it is important to surround your code with three backticks  
`````  
`like this`  
`````

You can edit and correct your post by clicking the pencil icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

_[View the full topic](https://discourse.nodered.org/t/typeerror-cannot-read-property-foreach-of-undefined/47953)._
