# Unable to start node-red after installing modbus sample code

**URL:** <https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393>\
**Category:** General\
**Created:** [9 May 2020 21:42 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393 "2020-05-09T21:42:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaza](https://avatars.discourse-cdn.com/v4/letter/z/e19b73/32.png) [@Zaza](https://discourse.nodered.org/u/Zaza)\
**Post date:** [9 May 2020 21:42 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/1 "2020-05-09T21:42:21Z")

</div>

Hi all,  
I recently copied the codes below related to modebus master and slave. Node red is not starting, and I am getting the error below. How do I go about solving or clearing the error?

9 May 21:46:27 - [info] Starting flows  
9 May 21:46:27 - [error] [function:Pump 1 simulator] SyntaxError: Unexpected token )  
9 May 21:46:27 - [info] Started flows  
9 May 21:46:27 - [red] Uncaught Exception:  
9 May 21:46:27 - Error: listen EADDRINUSE: address already in use 0.0.0.0:10502  
at Server.setupListenHandle [as \_listen2] (net.js:1280:14)  
at listenInCluster (net.js:1328:12)  
at doListen (net.js:1461:7)  
at process.\_tickCallback (internal/process/next\_tick.js:63:19)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 May 2020 21:49 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/2 "2020-05-09T21:49:10Z")

</div>

Firstly, no node should crash node-red, please raise an issue in the GitHub repo.

Next, start node-red in safe mode, edit your flow then deploy.

Search the forum, internet or read the docs for how to start safe mode.

---

<div class="post-metadata">

**Author:** ![Zaza](https://avatars.discourse-cdn.com/v4/letter/z/e19b73/32.png) [@Zaza](https://discourse.nodered.org/u/Zaza)\
**Post date:** [10 May 2020 08:25 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/3 "2020-05-10T08:25:39Z")

</div>

Thank you Steve.  
I started in safe mode. I made the necessary changes, then deployed. Problem solved.  
Thanks again for your help.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 May 2020 08:27 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/4 "2020-05-10T08:27:13Z")

</div>

No problem. Did you raise an issue on the repo? Would be good for all future users for this to be fixed.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 May 2020 08:28 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/5 "2020-05-10T08:28:29Z")

</div>

It's a known issue. I don't think you can run both slave and master as they can't both "grab" the port.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 May 2020 08:34 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/6 "2020-05-10T08:34:27Z")

</div>

Cheers. Then perhaps @Zaza should leave a "me too" type of comment to add some weight behind it & let the Dev know it's not a one off?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 May 2020 09:03 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/7 "2020-05-10T09:03:09Z")

</div>

yeah - like shouting at devs really motivates them 😉

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 May 2020 09:16 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/8 "2020-05-10T09:16:25Z")

</div>

No of course not but if the dev believes it to be a one off concern - they might think its the users environment & not put too much time or thought into it. but if all users at least +1 or "me too" an issue (and the dev gives a monkeys) then it might re-order priorities.

PS, I know you know what i mean 😉

---

<div class="post-metadata">

**Author:** ![Zaza](https://avatars.discourse-cdn.com/v4/letter/z/e19b73/32.png) [@Zaza](https://discourse.nodered.org/u/Zaza)\
**Post date:** [10 May 2020 09:40 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/9 "2020-05-10T09:40:08Z")

</div>

Yes, I raised it in the GitHub repo.  
I hope that someone will take note.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 May 2020 09:58 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/10 "2020-05-10T09:58:39Z")

</div>

Yes I know what you mean. But a +1 without any additional help/context/diagnostic is not moving things forwards.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 May 2020 09:58 UTC](https://discourse.nodered.org/t/unable-to-start-node-red-after-installing-modbus-sample-code/26393/11 "2020-05-24T09:58:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
