Updating Node-Red npm problem

#1

I just tried updating Node-Red to 0.19.1 - not the preinstalled version on a PI. On page https://nodered.org/docs/getting-started/upgrading.html it tells you to use the following: ```
sudo npm cache clean
sudo npm install -g --unsafe-perm node-red

That first line fails - NPM ERR! as of NPM@5, etc etc,,,,
0 Likes

#2

The SECOND LINE- the Node-Red install - seemed to have more than its fair share of warnings:

npm WARN deprecated bcrypt@1.0.3: bcrypt < v2.0.0 is susceptible to bcrypt wrap-around bug. Upgrade to bcrypt >= v2.0.0 for improved support for newer bcrypt hashes
npm WARN deprecated i18next-client@1.10.3: you can use npm install i18next from version 2.0.0
npm WARN deprecated nodemailer@1.11.0: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated mailparser@0.6.2: This project is unmaintained
npm WARN deprecated mimelib@0.3.1: This project is unmaintained
npm WARN deprecated mailcomposer@2.1.0: This project is unmaintained
npm WARN deprecated buildmail@2.0.0: This project is unmaintained
/usr/bin/node-red -> /usr/lib/node_modules/node-red/red.js
/usr/bin/node-red-pi -> /usr/lib/node_modules/node-red/bin/node-red-pi
+ node-red@0.18.7```

and though the update from 0.18.7 failed apparently, NR is still working. I stopped NR, tried the update and restarted. Still 0.18.7
0 Likes

#3

Is this on a pi? If so then run the pi upgrade script.

0 Likes

#4

It IS on a PI but the instruction on the same page says (I believe) to use the PI upgrade script only on the preinstalled NR on the PI. I am NOT using the preinstalled version.

0 Likes

#5

Hi Pete, this is what the install instructions say:

If you have a version of Raspbian, or other Debian based install, such as Ubuntu , or Diet-Pi , that doesn’t have Node-RED already installed, you can install or upgrade using the Node-RED upgrade script command

bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
0 Likes

#6

Ok, I'll give that a shot now, I have a backup. Thanks.

0 Likes

#7

Pete runs his own install script so the default one may or may not conflict with his, which is why he's running off piste. But yes those warning are still expected (until we drop node4 support (in v0.20..) )

Pete - you don't show the log when you do subsequently run it... is it now at 0.19.2 ?
if not you may need to force it with sudo npm i -g --unsafe-perm node-red@0.19.2

0 Likes

#8

As advised, I used your upgrade script - and - up to now - yes, wheee... everything is working. and upgraded.

0 Likes

#9

incidentally why - when one uses no-red-start do you then have to hit control-C to get back to the console? Just a thought.

1 Like

#10

because originally we just had node-red-start and node-red-stop, and most times we think users want to start it and see what is going on - and making it such that the icon shortcut would do that was easier than having one shortcut to start and another to open the log, as not everyone starts it automatically as a service, especially new users.

0 Likes