Error updating nodes in Manage palette

743 views
Skip to first unread message

Max Reynolds

unread,
Apr 17, 2018, 7:23:43 AM4/17/18
to Node-RED
I have some nodes which appear in the Manage palette lists as requiring an update however the update fails with -

"Failed to update: node-red-contrib-play-audio - Module not locally installed"

I've used via the command line the command 'npm outdated' however this shows nothing.

I have also tried using the Node Red Admin command line tool to display the outdated nodes and remove/install them to the latest version however the Manage palette still displays the older version and the need to update them. 

Can you please suggest how I can correct this?

  

Mark Setrem

unread,
Apr 17, 2018, 7:32:44 AM4/17/18
to Node-RED

You will probably have installed them as a global node 

npm list -g 

should list everything globally installed ( which should include the ones you are looking for)

and 

npm uninstall -g <package>

should then delete them,  you can then resinstall using the Manage Palette option

Max Reynolds

unread,
Apr 17, 2018, 7:48:27 AM4/17/18
to Node-RED
Thanks Mark, I was able to list and uninstall and after restarting node-red the nodes were displayed as being the current version.

I didn't originally install these nodes as they came with the node-red install so I don't know how they came to be 'not locally installed'.

Dave C-J

unread,
Apr 17, 2018, 9:02:36 AM4/17/18
to node...@googlegroups.com
On the pre-install we can only install them globally - (not local) as packages aren't supposed to write to user locations. If/when you run the update script it should move them across to be in user space and remove the old global ones... If not then if you do know the steps you took to upgrade I'd be interested.

Max Reynolds

unread,
Apr 17, 2018, 7:08:20 PM4/17/18
to Node-RED
I upgraded my fresh raspbian installation by - 

update-nodejs-and-nodered

The node node-red-node-email still displays that an update is available and the same 'module is not locally installed' error. 

I have tried to uninstall it with both node-red in a stopped and active state however it fails to uninstall using npm uninstall -g <package> and there is no indication that the uninstall has failed.

I probably won't ever use this node but I just curious as to why the update was failing.

Is there another way I should be uninstalling this node?   

Max Reynolds

unread,
Apr 17, 2018, 9:43:51 PM4/17/18
to Node-RED
Also, should I have added sudo to the update-nodejs-and-nodered command?

Colin Law

unread,
Apr 18, 2018, 2:39:54 AM4/18/18
to node...@googlegroups.com
On 18 April 2018 at 02:43, Max Reynolds <dink...@gmail.com> wrote:
Also, should I have added sudo to the update-nodejs-and-nodered command?

No, don't use sudo for this.

Colin
 

Colin Law

unread,
Apr 18, 2018, 2:43:05 AM4/18/18
to node...@googlegroups.com
On 18 April 2018 at 00:08, Max Reynolds <dink...@gmail.com> wrote:
I upgraded my fresh raspbian installation by - 

update-nodejs-and-nodered

The node node-red-node-email still displays that an update is available and the same 'module is not locally installed' error. 

I have tried to uninstall it with both node-red in a stopped and active state however it fails to uninstall using npm uninstall -g <package> and there is no indication that the uninstall has failed.

Copy/paste the results of
cd ~/.node-red
npm list -g node-red-node-email
npm list node-red-node-email

and also the uninstall.

Colin

Max Reynolds

unread,
Apr 18, 2018, 5:08:55 AM4/18/18
to Node-RED
The uninstall briefly flashes some text that is unreadable. Is there a log I can reference for this? 

The list commands are as follows - 

pi@node-red-prod:~ $ cd ~/.node-red
pi@node-red-prod:~/.node-red $ npm list -g node-red-node-email
/usr/lib
└─┬ node...@0.18.4
  └── node-red-...@0.1.27 

pi@node-red-prod:~/.node-red $ npm list node-red-node-email
node-red...@0.0.1 /home/pi/.node-red
└── node-red-...@0.1.29  extraneous

npm ERR! extraneous: node-red-...@0.1.29 /home/pi/.node-red/node_modules/node-red-node-email


Max

Colin Law

unread,
Apr 18, 2018, 6:17:57 AM4/18/18
to node...@googlegroups.com
On 18 April 2018 at 10:08, Max Reynolds <dink...@gmail.com> wrote:
The uninstall briefly flashes some text that is unreadable. Is there a log I can reference for this? 

The list commands are as follows - 

pi@node-red-prod:~ $ cd ~/.node-red
pi@node-red-prod:~/.node-red $ npm list -g node-red-node-email
/usr/lib
└─┬ node...@0.18.4
  └── node-red-...@0.1.27 

pi@node-red-prod:~/.node-red $ npm list node-red-node-email
node-red...@0.0.1 /home/pi/.node-red
└── node-red-...@0.1.29  extraneous

npm ERR! extraneous: node-red-...@0.1.29 /home/pi/.node-red/node_modules/node-red-node-email

It looks like you have two versions installed, one global and one local.  Start by uninstalling them both from the command line (which is what I assumed you were doing).

cd ~/.node-red
sudo npm remove -g node-red-node-email
npm remove node-red-node-email

If there are any errors from these then paste them here.
Then repeat the npm list commands to make sure they are both gone.  If they are then you should be good to re-install if you want to.

Colin
 


Max



On Wednesday, April 18, 2018 at 4:43:05 PM UTC+10, Colin Law wrote:
On 18 April 2018 at 00:08, Max Reynolds <dink...@gmail.com> wrote:
I upgraded my fresh raspbian installation by - 

update-nodejs-and-nodered

The node node-red-node-email still displays that an update is available and the same 'module is not locally installed' error. 

I have tried to uninstall it with both node-red in a stopped and active state however it fails to uninstall using npm uninstall -g <package> and there is no indication that the uninstall has failed.

Copy/paste the results of
cd ~/.node-red
npm list -g node-red-node-email
npm list node-red-node-email

and also the uninstall.

Colin

--
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+unsubscribe@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/895b6ace-3f1b-4ae6-973c-3a6df9ff82a1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Max Reynolds

unread,
Apr 18, 2018, 8:02:14 AM4/18/18
to Node-RED
Thanks Colin...here's the output from the remove commands - 

pi@node-red-prod:~/.node-red $ sudo npm remove -g node-red-node-email
pi@node-red-prod:~/.node-red $ npm list -g node-red-node-email
/usr/lib
└─┬ node...@0.18.4
  └── node-red-...@0.1.27 

pi@node-red-prod:~/.node-red $ npm remove node-red-node-email
- addres...@1.0.1 node_modules/addressparser
- addres...@0.3.2 node_modules/buildmail/node_modules/addressparser
- cl...@1.0.4 node_modules/clone
- escape-str...@1.0.5 node_modules/escape-string-regexp
- ext...@3.0.1 node_modules/extend
- libb...@0.1.0 node_modules/libbase64
- li...@1.1.0 node_modules/libqp
- mini...@0.0.10 node_modules/minimist
- nodemailer...@0.1.10 node_modules/nodemailer-wellknown
- safer-...@2.1.2 node_modules/safer-buffer
- iconv...@0.4.21 node_modules/iconv-lite
- nee...@0.10.0 node_modules/buildmail/node_modules/needle
- enco...@0.1.12 node_modules/encoding
- mim...@0.3.1 node_modules/mimelib
- lib...@1.2.0 node_modules/libmime
- buil...@2.0.0 node_modules/buildmail
- mailco...@2.1.0 node_modules/mailcomposer
- nee...@0.11.0 node_modules/needle
- sem...@5.3.0 node_modules/semver
- smtp-co...@1.3.8 node_modules/smtp-connection
- nodemailer-di...@1.1.0 node_modules/nodemailer-direct-transport
- nodemailer-s...@1.1.0 node_modules/nodemailer-smtp-transport
- string_...@0.10.31 node_modules/string_decoder
- readabl...@1.1.14 node_modules/readable-stream
- ut...@1.0.2 node_modules/utf7
- u...@3.1.2 node_modules/uue
- word...@0.0.3 node_modules/wordwrap
- opti...@0.6.1 node_modules/optimist
- im...@0.8.19 node_modules/imap
- mailp...@0.6.2 node_modules/mailparser
- nodem...@1.11.0 node_modules/nodemailer
- pop...@0.1.7 node_modules/poplib
- node-red-...@0.1.29 node_modules/node-red-node-email
npm WARN node-red...@0.0.1 No repository field.
npm WARN node-red...@0.0.1 No license field.
pi@node-red-prod:~/.node-red $ npm list -g node-red-node-email
/usr/lib
└─┬ node...@0.18.4
  └── node-red-...@0.1.27 

pi@node-red-prod:~/.node-red $ npm list node-red-node-email
node-red...@0.0.1 /home/pi/.node-red
└── (empty)

npm ERR! code 1
pi@node-red-prod:~/.node-red $ 

The manage palette still logs the not locally installed error and shows that 1.27 is installed with 1.29 available for update. 
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.

Colin Law

unread,
Apr 18, 2018, 8:59:40 AM4/18/18
to node...@googlegroups.com
On 18 April 2018 at 13:02, Max Reynolds <dink...@gmail.com> wrote:
Thanks Colin...here's the output from the remove commands - 

pi@node-red-prod:~/.node-red $ sudo npm remove -g node-red-node-email
pi@node-red-prod:~/.node-red $ npm list -g node-red-node-email
/usr/lib
└─┬ node...@0.18.4
  └── node-red-...@0.1.27 

I think you will have to wait for one of the experts to work out what is going on there.

Colin

Dave C-J

unread,
Apr 18, 2018, 11:53:33 AM4/18/18
to node...@googlegroups.com
thanks for those...
Can see what is (not) going on...
for now the brutal way is...
    cd /usr/lib/node_modules/node-red && sudo npm uninstall --unsafe-perm node-red-node-email
then when you restart it should pick up the other one (if still there) or if not at least you should be able to install it a-new via the palette manager.
The extra brutal way is
    cd /usr/lib/node_modules/node-red
    sudo rm -rf node-red-node-email
(but make sure the cd... works first :-)

Max Reynolds

unread,
Apr 19, 2018, 1:24:35 AM4/19/18
to Node-RED
Thank you Dave. The first command worked and I was then able to install the current version.

Colin Law

unread,
Apr 19, 2018, 3:47:13 AM4/19/18
to node...@googlegroups.com
On 18 April 2018 at 16:53, Dave C-J <dce...@gmail.com> wrote:
> thanks for those...
> Can see what is (not) going on...
> for now the brutal way is...
> cd /usr/lib/node_modules/node-red && sudo npm uninstall --unsafe-perm
> node-red-node-email

Dave, out of interest could you explain why it needs unsafe-perm to
uninstall it please? I looked at the npm docs but was none the wiser
unfortunately.

Colin

Dave C-J

unread,
Apr 19, 2018, 3:54:44 AM4/19/18
to node...@googlegroups.com
It shouldn't really - but npm seems to want to try to re-optimise things and so seems (for me at least) to try recompiling some of the other modules there and that fails if you don't use --unsafe-perm.
Your mileage may vary.

Colin Law

unread,
Apr 19, 2018, 4:00:43 AM4/19/18
to node...@googlegroups.com
OK, thanks.

Colin
> --
> 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/CACXWFwKwiqgiLOUth-vG0MqTisr3t-8wJEirdHdq50zXO761pA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages