HowTo refresh installed nodes

I reinstalled my pi and NR. So I have to download all additional mudules I used via the palette menu in NR. I have had the console open, so I saw some warnings about depricated modules.

I'm not so firm with this context and don't know what to do? Is there an update function anywhere in the NR GUI oder perhaps via console to get the newest modules?

The console output:

2021-06-23T16:10:28.145Z Installieren : node-red-dashboard 2.29.3

2021-06-23T16:10:27.917Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-dashboard@2.29.3
2021-06-23T16:11:09.669Z [err] npm
2021-06-23T16:11:09.670Z [err]  
2021-06-23T16:11:09.671Z [err] WARN
2021-06-23T16:11:09.672Z [err]  
2021-06-23T16:11:09.673Z [err] deprecated
2021-06-23T16:11:09.674Z [err]  debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
2021-06-23T16:12:31.431Z [out] + node-red-dashboard@2.29.3
2021-06-23T16:12:31.431Z [out] added 72 packages from 58 contributors in 120.962s
2021-06-23T16:12:34.278Z rc=0

-----------------------------------------------------------
2021-06-23T16:19:19.519Z Installieren : node-red-node-openweathermap 0.4.0

2021-06-23T16:19:19.287Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-openweathermap@0.4.0
2021-06-23T16:19:28.114Z [err] npm
2021-06-23T16:19:28.115Z [err]  WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
2021-06-23T16:19:29.112Z [err] npm 
2021-06-23T16:19:29.112Z [err] WARN deprecated har-validator@5.1.5: this library is no longer supported
2021-06-23T16:19:29.729Z [err] npm WARN
2021-06-23T16:19:29.729Z [err]  deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
2021-06-23T16:20:16.254Z [out] + node-red-node-openweathermap@0.4.0
2021-06-23T16:20:16.254Z [out] added 43 packages from 54 contributors in 54.384s

When reinstalling Node-RED, if you have kept your ~/.node-red/package.json file, you can simply do:

cd ~/.node-red
npm install

That will install versions as indicated in the json file. They may not be the latest though.

So the next thing to do is to go into Node-RED and look at the "Manage Palette" menu option. It will tell you if there are updates you can apply and will let you update them. That is the safest option. However, if you know what you are doing, you can also use the command line similar to the above:

cd ~/.node-red
# This tells you what updates are available - note the colour coding though
npm outdated
# This will update things to the level allowed by your current package.json dependencies
npm update

You should read up on the npm package manager if you want to use the command line as there are a few things that can catch you out such as major version changes that might only be compatible with specific versions of node.js and/or node-red.

In general, any update that changes the major version number should be checked for any new dependencies or other breaking changes. Though for packages that are less than v1, even a minor version change may occasionally be breaking.

1 Like

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