Node-RED (Docker container) node upgrades failing

I am running Node-RED in a docker container and have done for quite some time. Whenever a new release of Node-RED occurs I simply pull down the new docker image and restart the container. I run the container with the following command:

docker run -v /share/appdata/node-red:/data -p 0.0.0.0:1880:1880/tcp -P --net bridge --restart always --expose 1880/tcp -d -t -i nodered/node-red:latest

What has recently started happening is that whenever I try to upgrade a node in the Palette, I get an error like this, no matter what node I try and upgrade:

2024-12-18T02:05:21.318Z [err] npm error code 1
2024-12-18T02:05:21.319Z [err] npm error path /data/node_modules/node
2024-12-18T02:05:21.319Z [err] npm error command failed
2024-12-18T02:05:21.319Z [err] npm error command sh -c node installArchSpecificPackage
2024-12-18T02:05:21.320Z [err] npm error npm WARN npm npm does not support Node.js v20.18.1
2024-12-18T02:05:21.320Z [err] npm error npm WARN npm You should probably upgrade to a newer version of node as we
2024-12-18T02:05:21.320Z [err] npm error npm WARN npm can't make any promises that npm will work with this version.
2024-12-18T02:05:21.320Z [err] npm error npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9, 10.
2024-12-18T02:05:21.320Z [err] npm error npm WARN npm You can find the latest version at https://nodejs.org/
2024-12-18T02:05:21.320Z [err] npm error npm ERR! cb.apply is not a function
2024-12-18T02:05:21.320Z [err] npm error
2024-12-18T02:05:21.320Z [err] npm error npm ERR! A complete log of this run can be found in:
2024-12-18T02:05:21.320Z [err] npm error npm ERR!     /data/.npm/_logs/2024-12-18T02_05_19_837Z-debug.log
2024-12-18T02:05:21.320Z [err] npm error node:internal/modules/cjs/loader:1228
2024-12-18T02:05:21.320Z [err] npm error   throw err;
2024-12-18T02:05:21.320Z [err] npm error   ^
2024-12-18T02:05:21.320Z [err] npm error
2024-12-18T02:05:21.320Z [err] npm error Error: Cannot find module 'node-linux-x64/package.json'
2024-12-18T02:05:21.320Z [err] npm error Require stack:
2024-12-18T02:05:21.320Z [err] npm error - /data/node_modules/node/installArchSpecificPackage.js
2024-12-18T02:05:21.320Z [err] npm error     at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
2024-12-18T02:05:21.320Z [err] npm error     at Function.resolve (node:internal/modules/helpers:190:19)
2024-12-18T02:05:21.320Z [err] npm error     at ChildProcess.<anonymous> (/data/node_modules/node-bin-setup/index.js:19:27)
2024-12-18T02:05:21.320Z [err] npm error     at ChildProcess.emit (node:events:518:28)
2024-12-18T02:05:21.320Z [err] npm error     at maybeClose (node:internal/child_process:1104:16)
2024-12-18T02:05:21.320Z [err] npm error     at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
2024-12-18T02:05:21.320Z [err] npm error   code: 'MODULE_NOT_FOUND',
2024-12-18T02:05:21.320Z [err] npm error   requireStack: [ '/data/node_modules/node/installArchSpecificPackage.js' ]
2024-12-18T02:05:21.320Z [err] npm error }
2024-12-18T02:05:21.320Z [err] npm error
2024-12-18T02:05:21.320Z [err] npm error Node.js v20.18.1
2024-12-18T02:05:21.325Z [err] npm error A complete log of this run can be found in: /data/.npm/_logs/2024-12-18T02_04_52_413Z-debug-0.log

Can anyone offer any guidance as to what is the issue and how I can resolve this?
Currently the image is version 4.0.6 of Node-RED.

Thanks in advance for any assistance.

My docker update from V4.0.5 to V4.0.7 did it without problems.

docker compose:

  nodered:
    build: ./docker/nodered
    container_name: nodered
    restart: always    
    environment:
    - TZ=Europe/Berlin
    - SELENIUM_REMOTE_URL=http://selenium:4444
    - SELENIUM_BROWSER=chrome
  #  - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
    ports:
    - 1880:1880
    depends_on:
      - mosquitto
      - mariadb
      - selenium
    volumes:
    - ./data/nodered:/data
    - ./data/nodered/home:/home
    - ./data/mosquitto/data:/mosquitto/data

dockerfile:

FROM nodered/node-red:latest

USER root

# Packages:
RUN apk update && apk add --no-cache \
    ffmpeg \
    iputils \
    iproute2 \
    arp-scan \
    # firefox-esr \
    # geckodriver \
    xvfb \
    udev \
    ttf-freefont \
    dbus \
    mesa-gl \
    mesa-dri-gallium \
    py3-pip \
    python3-dev \
    build-base \
    bash \
    libstdc++ \
    libgcc \
    libx11 \
    libx11-dev \
    libxrender \
    libxrender-dev \
    libxext \
    libxext-dev

maybe it helps somehow.