Cannot update modbus node because of NPM version 7.7.6

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?


The bash file I use is:

curl -sL | sudo -E bash

and after that:

sudo apt install nodejs

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.

1 Like

@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 in order to keep modbus running without problems?

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.

1 Like

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

curl -sL | sudo -E bash


I used

curl -sL | sudo -E bash

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

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)

1 Like

@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+

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

1 Like

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