# Cannot update modbus node because of NPM version 7.7.6

**URL:** <https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474>\
**Category:** General\
**Created:** [29 November 2021 19:15 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474 "2021-11-29T19:15:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [29 November 2021 19:15 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/1 "2021-11-29T19:15:20Z")

</div>

I just tried to update my installed modbus node, but the install log told me that the NPM version was too low.  
I needed version 10 or higher, but before I updated the system with a bash file I thought was the right way to update and gave me version 7.7.6 of NPM. Can anyone advise me on this subject?

![afbeelding](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/9/d90b16fc4f18cbf5e84515d33e25d5b5f4802e02.png)

 ![afbeelding](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/541e54286ff94257a7af6f06655f980ae6865dec.png)

The bash file I use is:

> curl -sL [https://deb.nodesource.com/setup\_15.x](https://deb.nodesource.com/setup_15.x) | sudo -E bash

and after that:

> sudo apt install nodejs

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [29 November 2021 19:25 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/2 "2021-11-29T19:25:40Z")

</div>

The error is not about your npm version.

It's the version of node.js you are using.

The error says the module only supports node \>= 10 but \< 15.

So 15 isn't supported and you'll need to install something earlier, like 14.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [29 November 2021 19:34 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/3 "2021-11-29T19:34:28Z")

</div>

@knolleary My current version of modbus is 5.14.1 that I was trying to update to 5.15.0. Did I overshoot with updating node.js? So will I need to install an earlier version of node.je in order to keep modbus running without problems?

Did I use the right bash file to update my system every now and then?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [29 November 2021 19:37 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/4 "2021-11-29T19:37:38Z")

</div>

> [@henkkas](#):
>
> Did I use the right bash file to update my system every now and then?

Given the path of the file has `15.x` in it, which is too new for modbus, then I'd say no, you aren't using the right bash file.

Look for the corresponding node 14 command.

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [29 November 2021 19:43 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/5 "2021-11-29T19:43:21Z")

</div>

@knolleary Sorry, I am not an expert at this, so should I use

> curl -sL [https://deb.nodesource.com/setup\_14.x](https://deb.nodesource.com/setup_14.x) | sudo -E bash

instead??

I used

> curl -sL [https://deb.nodesource.com/setup\_15.x](https://deb.nodesource.com/setup_15.x) | sudo -E bash

from the start of node-red, and was never warned by modbus node, even when installing modbus.

---

<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:** [29 November 2021 21:33 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/6 "2021-11-29T21:33:56Z")

</div>

Yes - use the node14 install.  
But which hardware platform are you running on ? If it's a Pi or Debian based operating system like Ubuntu you should be able to use the documented install script (with the extra --node14 parameter to force it to use node14)

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [30 November 2021 08:50 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/7 "2021-11-30T08:50:59Z")

</div>

@knolleary @dceejay Thankjs for your help, guys. I think the best thing to do for me, is keep running the current version, as I don't seem to have any problems with modbus. It is running without any problems now for months. Maybe when I go back to previous version of node.js, I will run into unexpected problems.

Also maybe modbus will be updated in the future to run with higher version of node.js too.

By the way @dceejay , I am running the system on a RPI 3B+

---

<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:** [30 November 2021 09:40 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/8 "2021-11-30T09:40:21Z")

</div>

OK - if it's working... don't fix it 🙂  
But yes our Pi install script should be the way to install/upgrade in future...  
(or for your next device)

---

<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:** [29 January 2022 09:40 UTC](https://discourse.nodered.org/t/cannot-update-modbus-node-because-of-npm-version-7-7-6/54474/9 "2022-01-29T09:40:40Z")

</div>

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