Unable to upgrade to version 22

Hi
I have a problem upgrading my node red to 22.0.1 on one of my HA installations.
They are both running HAOS 18.2 and HA 2026.7.4.
Here’s part of the node red log:

Flows stopped due to missing node types.
- MySQLdatabase
- mysql
- ping

Welcome to Node-RED
===================
5 Aug 13:16:25 - [info] Node-RED version: v5.0.2
5 Aug 13:16:25 - [info] Node.js  version: v24.18.1
5 Aug 13:16:25 - [info] Linux 6.18.39-haos x64 LE
5 Aug 13:16:25 - [info] Loading palette nodes
5 Aug 13:16:25 - [info] Node-RED Contrib Theme Collection version: v4.1.1

###
### The "request" library is not installed automatically anymore.
### But is a dependency of "request-promise".
### Please install it with:
### npm install request --save
###
5 Aug 13:16:26 - [info] node-red-contrib-home-assistant-websocket v0.80.3 nodes initialized
5 Aug 13:16:26 - [warn] ------------------------------------------------------
5 Aug 13:16:26 - [warn] [node-red-contrib-sunevents/node-red-contrib-sunevents] Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
5 Aug 13:16:26 - [warn] [node-red-contrib-counter/counter] Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
+ 30 more like it

and then:

5 Aug 13:16:26 - [warn] [node-red-contrib-viseo-google-spreadsheet/google-spreadsheet] Error: Cannot find module 'request'
Require stack:
- /config/node_modules/request-promise/lib/rp.js
- /config/node_modules/node-red-viseo-helper/index.js
- /config/node_modules/node-red-contrib-viseo-google-spreadsheet/google-spreadsheet.js
5 Aug 13:16:26 - [warn] [node-red-contrib-persistent-fsm/state-machine] Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.

I tried to add request to the node red app configuration. It says it’s deprecated, so it won’t install.
I have tried to look for clues in the release notes, with no success.
Help, please?
Helge

Ideas, anyone?

Hi Helge,

Would you mind sharing your app configuration? (Settings > Apps > Node-RED > Configuration > ⋮ > Edit in YAML, copy the text but remove any passwords)

Was everything working before you tried to upgrade to v22?

Have you manually installed any nodes using the Node-RED palette manager?

theme: default
http_node:
  username: ''
  password: ''
http_static:
  username: ''
  password: ''
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
system_packages:
  - ffmpeg
  - exiftool
  - fontconfig
  - ttf-dejavu
  - ttf-freefont
npm_packages:
  - sharp
init_commands: []
credential_secret: ***

i have a few manually added nodes. the ones node red is complaining about are node-red-node-mysql and node-red-node-ping

Everything was fine in version 21.0.10

Thanks.

I didn’t encounter any issues trying to duplicate that configuration, but maybe there are some outdated nodes that are giving you trouble. Have you looked to see if any nodes can be updated in the palette manager?

Try adding request --save to your config, save and restart.

system_packages:
  - ffmpeg
  - exiftool
  - fontconfig
  - ttf-dejavu
  - ttf-freefont
npm_packages:
  - request --save
  - sharp

Edit: there is also a newer version of the app, 22.0.2, that updates NR to v5.0.4

Great, thanks! That did it!
There are some warnings in the log when startnig node red, but it works!

npm warn deprecated [email protected]: this library is no longer supported
npm warn deprecated [email protected]: uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).

npm warn deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 41 packages, removed 24 packages, and audited 699 packages in 7s

The warning is that, that package is depreciated. It can be ignored. Hopefully the node that uses it will be updated and no longer require that package.