How to update npm in node red addon

In the nodered add on log, the following message appears:

61 packages are looking for funding
run npm fund for details

7 vulnerabilities (5 moderate, 2 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.
npm notice
npm notice New minor version of npm available! 10.2.4 → 10.5.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0
npm notice Run npm install -g [email protected] to update!
npm notice
s6-rc: info: service init-nodered successfully started
s6-rc: info: service nodered: starting
s6-rc: info: service nodered successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
[07:45:35] INFO: Starting Node-RED…
s6-rc: info: service legacy-services successfully started

How can I run npm audit fix and npm install -g [email protected] in nodered addon?

You don’t, those updates will be made when the addon is updated.

I updated the addon to the latest version, Current version: 17.0.9, but I still see this message in the log.

You will almost always have a warning that moduleX needs to be updated. The addon is always behind the latest releases. New versions get released, then the addon has to be updated. This takes time, it doesn’t happen immediately.

It should not impact the stability of node red. I’ve used it for years and I’ve always had some type of warning that there is a newer version of moduleX available. The other option would be to run node red independently from home assistant on another computer. then you can update as soon as newer versions are available.