# Node-red-node-serialport 1.0.3

**URL:** https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464
**Category:** General
**Tags:** docker
**Created:** [11 April 2023 17:17 UTC](https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464 "2023-04-11T17:17:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ratsea](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@Ratsea](https://discourse.nodered.org/u/Ratsea)
#### Post date: [11 April 2023 17:17 UTC](https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464/1 "2023-04-11T17:17:25Z")

</div>

I have been using this node for a couple of years using Node Red 2.2, and Version 0.11.0 for this node. It runs on a RPI3 / Buster and in a docker container on IOTStack.

Upgrading to Node Red 3.02, and the latest Serialport version of 1.0.3, and it no longer connects - I get a greyed out "not connected".  
If I downgrade the Serialport to 0.15.0, it works again provided I add the serial port mapping in the Docker-compose file. It continues to work on Bullseye too.  
I believe this is an issue with this version - 1.03.

---

<div class="post-metadata">

### Author: ![magicfire](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magicfire/32/93420_2.png) [@magicfire](https://discourse.nodered.org/u/magicfire)
#### Post date: [12 April 2023 08:16 UTC](https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464/2 "2023-04-12T08:16:39Z")

</div>

For your reference.  
In my ubuntu16.04.7LTS, nodered 3.0.2, and node-red-node-serialport 1.0.3. They work fine.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [12 April 2023 08:45 UTC](https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464/3 "2023-04-12T08:45:18Z")

</div>

`node-red-serialport` 1.0.3 uses the popular `serialport` package ^10.5.0.

The `serialport` package has a long history of shipping incompatible binaries for Alpine (docker) since v10.

`node-red-serialport` 0.15.0 uses `serialport` ^9.2.5 - where they did not ship broken binaries for Alpine.

That 's why, if you are not using virtualisation layers like Alpine (docker) you have no problem.

But there is a fix:

install the latest serial port node

THEN

Within the dockers terminal - what I mean but that, is a terminal that lives INSIDE the docker image (I don't use docker so not sure what the correct term is)

run the following from what would be the users Node RED home directory (normally `.node-red`)

`npm rebuild --build-from-source`

this will re-compile `serialport` ^10.5.0 for the environment this command is run from.

Working with the `serialport` package my self in my projects - I still have nightmares about the issues raised when my users were using Docker

---

<div class="post-metadata">

### Author: ![Ratsea](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@Ratsea](https://discourse.nodered.org/u/Ratsea)
#### Post date: [12 April 2023 21:13 UTC](https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464/4 "2023-04-12T21:13:11Z")

</div>

I tried your suggestion by adding npm rebuild --build-from-source to the Docker file with user Node\_red but there was a long list of missing items with nodered\_list\_installed\_nodes and there was the same segmentation fault.  
I have rolled back to Serialport 0.15.0 and it's working again.  
I am thinking 'Not to mend what's not broke', I might try to move the serial device onto an ESP8266 and then just use MQTT to harvest the data, if the serialport is so fussy.

---

<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: [11 June 2023 21:13 UTC](https://discourse.nodered.org/t/node-red-node-serialport-1-0-3/77464/5 "2023-06-11T21:13:33Z")

</div>

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