updating Node Red

240 views
Skip to first unread message

Peter Scargill

unread,
May 1, 2018, 12:15:29 PM5/1/18
to Node-RED
A small number of nodes will not update  using the palette manager. My Node-Red is running as user PI on a Raspberry PI 2.  Can someone advise how thse nodes should be updated please. For example, email, rbe and twitter nodes,

Regards

Pete  

Mark Setrem

unread,
May 1, 2018, 12:56:04 PM5/1/18
to Node-RED

Nick O'Leary

unread,
May 1, 2018, 1:16:45 PM5/1/18
to Node-RED Mailing List
Mark - this is an edge case the docs don't cover.

Peter,

the nodes you list are ones that are installed with node-red itself. That means they are not installed in your .node-red directory, they are installed alongside the node-red module itself. This is why they cannot be updated by the palette manager. If you used the Pi update script we provide to setup your Pi, those particular modules get moved into .node-red so they can be updated more easily. But as you have your own setup, you'll have to do this a more manual way.

To update them you first need to find them.

First run:

npm list -g node-red

That will give you the location on disk where the node-red module is installed (assuming you have it installed as a global module... again, if this is your own setup, you'll have to take into account whatever your setup does).

Then go into the node_modules/node-red directory within the directory returned by the command above.

Then you should be able to run:

   sudo npm install node-red-node-email

to update the email node - follow suite for any of the node-red-node- modules under there that you want to update.

That should do it.



Nick

On Tue, 1 May 2018 at 17:56, Mark Setrem <mse...@gmail.com> wrote:
--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/4e9c92dc-8280-4073-b6fa-f77abfcc8cce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Scargill

unread,
May 2, 2018, 5:11:54 AM5/2/18
to node...@googlegroups.com

Thanks Nick, having screwed up my installation, I’m back to a backup.. node-red is indeed at /usr/lib  and I tried restoring email as below but possibly too late in the game.. hence the restore. It is so long since we did tis part of our script I can’t remember why NR is there and not all under the PI directory.

You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/eG2B89QGAzI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.


To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Peter Scargill

unread,
May 2, 2018, 5:58:30 AM5/2/18
to node...@googlegroups.com

Well I tried Nick – ran your script.. all went well, but as well as serial missing, sqlitedb and sqlite are missing. Any ideas?

 

Pete

 

From: node...@googlegroups.com <node...@googlegroups.com> On Behalf Of Nick O'Leary
Sent: 01 May 2018 19:17
To: Node-RED Mailing List <node...@googlegroups.com>
Subject: Re: [node-red] Re: updating Node Red

 

Mark - this is an edge case the docs don't cover.

You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/eG2B89QGAzI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.


To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Nick O'Leary

unread,
May 2, 2018, 6:00:32 AM5/2/18
to Node-RED Mailing List
Without the full log of the script, I couldn't say.

But they do include binary modules that require compiling so something may have tripped up there.

I'd run `npm install` of the missing modules manually in /home/pi/.node-red/

Nick

Peter Scargill

unread,
May 2, 2018, 6:08:13 AM5/2/18
to node...@googlegroups.com

I tried the install, made no difference, nr reporting a version difference in /home/pi/node-red/node-modules/sqlite3/lib/binding  - it is seeing a directory node-v47-linux-arm and wants 48. I tried renaming the folder but inside is a node_sqlite3.node which has a reference to 47 in it. It is binary so I cant fix that. Help?

Nick O'Leary

unread,
May 2, 2018, 6:11:18 AM5/2/18
to Node-RED Mailing List
What version of node.js and npm are you using (node -v   and    npm -v) ?

In /home/pi/.node-red run:

   npm rebuild sqlite3

See where that gets you.

Failing that, delete /home/pi/.node-red/node_modules/sqlite3 and re-run the npm install for the sqlite node-red module.

Nick

Peter Scargill

unread,
May 2, 2018, 8:49:06 AM5/2/18
to node...@googlegroups.com

Sorry to be dense.. doesn’t your script update those along with node-red. I ran it off the link..

                                                                                                   

 

works a treat it would seem apart from the serial port and sqlite (and sqlitedb which I assume comes with sqlite node as I’’ve never needed to install that).

 

Your help here really appreciated.

 

If we resolve this I’ll amend my script to incorporate and obviously credit authors.

Nick O'Leary

unread,
May 2, 2018, 8:50:22 AM5/2/18
to Node-RED Mailing List
I would expect it to yes. This is why I said "Without the full log of the script, I couldn't say [why it had failed to in this instance]"

Peter Scargill

unread,
May 2, 2018, 9:03:24 AM5/2/18
to node...@googlegroups.com

Sqlite works. Just the serial port to go and in the process of that rebuild line, serial seems to have magically installed.

 

Silly question but why didn’t all nodes update to latest while your script was running?

Nick O'Leary

unread,
May 2, 2018, 9:06:01 AM5/2/18
to Node-RED Mailing List
Pete,

the script only updates the bits it is responsible for - node, node-red and the handful of extra nodes it provides.

It doesn't touch any nodes you have separately installed yourself.

Nick

Peter Scargill

unread,
May 2, 2018, 9:49:30 AM5/2/18
to node...@googlegroups.com

Ok, re-ran update script without issue BUT that didn’t fix serialport. Didn’t compile properly – then contrib/gpio said mudule version mismatch – missing serialport dependency – expected 48, got 47.  Error module version mismatch.

 

Looks like docs don’t completely cover this? Ideas?

Nick O'Leary

unread,
May 2, 2018, 9:54:38 AM5/2/18
to Node-RED Mailing List
Pete,

asking again: What version of node.js and npm are you using (node -v   and    npm -v) ?

Earlier I suggested:

In /home/pi/.node-red run:
   npm rebuild sqlite3
See where that gets you
Failing that, delete /home/pi/.node-red/node_modules/sqlite3 and re-run the npm install for the sqlite node-red module.
I'm not clear now if that worked or not for you. If that did work, try the same for the module 'serialport'

Nick







Peter Scargill

unread,
May 2, 2018, 10:03:06 AM5/2/18
to node...@googlegroups.com

Sorry I replied but used wrong email address.  I’m using the versions in your script

I ran the script it updated all but rbe and serial. I followed your instructions and rbe is fine and so NR now works. But even running your update script a second time as suggested in the docs (no errors thron) – I get

 

It looks like serialport didn't compile properly. This is a common problem and its fix is well documented here https://github.com/voodootikigod/node-serialport#to-install

The result of requiring the package is:  undefined

2 May 15:43:55 - [warn] ------------------------------------------------------

2 May 15:43:55 - [warn] [node-red-contrib-gpio/gpio] Error: Module version mismatch. Expected 48, got 47.

2 May 15:43:55 - [warn] [node-red-node-arduino/arduino] Missing serialport dependency

2 May 15:43:55 - [warn] ------------------------------------------------------

Peter Scargill

unread,
May 2, 2018, 12:29:15 PM5/2/18
to node...@googlegroups.com

Hi

 

After upgrading all nodes in palate manager 3 at a time, , the last one was the node-red-node-sqlite node, which took me back to square one with sqlite node. Tried reinstalling outside of NR using npm and that didn’t work. Npm installed sqlite (does a recompile).

Millions of warnings, a mess. This time however, could not find the v48 version and stopped node-red.

Peter Scargill

unread,
May 2, 2018, 1:04:57 PM5/2/18
to node...@googlegroups.com

 

Turns out I npm updated sqlite, not sqlite3. I deketed all sqlite and sqlite3 and node-red-node-sqlie and did 2 new installs.. ie sqlite3 and node-red-node-sqlite. Hours later that worked. But the whole thing is a mess.

 

Working and backed up with rpi sd backup – a very essential tool that others would do well to recreate.

David Caparrós

unread,
May 6, 2018, 5:36:59 PM5/6/18
to Node-RED
After trying to upgrade I had the same problem, I think it should be some issue with the latest npm module package

Nick O'Leary

unread,
May 6, 2018, 5:57:16 PM5/6/18
to node...@googlegroups.com
> I think it should be some issue with the latest npm module package

Which npm module are you referring to?




On Sun, 6 May 2018, 22:37 David Caparrós, <davi...@gmail.com> wrote:
After trying to upgrade I had the same problem, I think it should be some issue with the latest npm module package

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

David Caparrós

unread,
May 6, 2018, 6:17:17 PM5/6/18
to Node-RED

node-red-node-sqlite

David Caparrós

unread,
May 7, 2018, 6:22:41 AM5/7/18
to Node-RED


Definitely should be something wrong with this package, I have recovered SD to my previous image and updated all (distro + node-red+nodejs + npm packages (except sqlitle)) and all now is working well.

I have pending only this:

Package                    Current  Wanted  Latest  Location
node-red-contrib-bigtimer    1.8.1   1.8.1   1.9.2  node-red-project
node-red-node-emoncms       0.0.15  0.0.15   0.2.1  node-red-project
node-red-node-sqlite         0.1.2   0.1.2   0.2.1  node-red-project

If I try to update sqlite will crash and will have to delete all related to sqlite nodes, just to be aware for someone else not to try as advice....

Regards

Peter Scargill

unread,
May 7, 2018, 11:53:18 AM5/7/18
to node...@googlegroups.com

Julian pointed me in the right direction for SQLite. I deleted both SLite and SqQLite3 nodes and the SQLite Node Red Node and reinstalled using sudo. All is well, nothing lost. I upated ALL nodes inc Bigtimer (obviously) and Serial which gave me the most grief.  I am now fully updated and all nodes are under /home/pi/node-red for the first time and all should now update without leaving NR. Hope you have the same success.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/eG2B89QGAzI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Dave C-J

unread,
May 7, 2018, 12:01:21 PM5/7/18
to node...@googlegroups.com
Hi

what platform is this on ? 
The sqlite3 package does have a warning in it's readme saying it support node 4,5,6 & 7... but no mention of 8 yet... though I see there are some open issues and the pre-build is there for some platforms... 

Dave C-J

unread,
May 7, 2018, 2:33:43 PM5/7/18
to node...@googlegroups.com
I've just tried on node8 on a Mac and a Pi and a clean install of node-red-node-sqlite works fine...  So what are/were you upgrading from and to ? Was it both the node.js version and the node itself ? 

Peter Scargill

unread,
May 8, 2018, 9:00:12 AM5/8/18
to node...@googlegroups.com
In my case I was having trouble with some nodes not upading within node red and used you script to reinstall in pi/node-red as needed. I had trouble with serial and sqlite but ultimately now all is well and I can upgrade everything without leaving Node Red.

On 7 May 2018 20:33:44 Dave C-J <dce...@gmail.com> wrote:

I've just tried on node8 on a Mac and a Pi and a clean install of node-red-node-sqlite works fine...  So what are/were you upgrading from and to ? Was it both the node.js version and the node itself ? 

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/eG2B89QGAzI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
Reply all
Reply to author
Forward
0 new messages