Modalità di lettura

Peertube does not recognize new NodeJS version after update

OS: Debian 11.11

Current Peertube version: 8.1.8, trying to update to 8.2.0

Current NodeJS version at /usr/local/bin/node:

# node
Welcome to Node.js v24.16.0.
Type ".help" for more information.
> 

This is the version that is executed when running node on command line. There is still an outdated version located at /etc/alternatives

# /etc/alternatives/nodejs 
Welcome to Node.js v20.20.2.
Type ".help" for more information.

Most likely the old NodeJS was installed with apt. A later version is not available in the standard repository:

# apt upgrade nodejs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
nodejs is already the newest version (20.20.2-1nodesource1).

The later version was installed by running npm install n -g and

 n stable
     copying : node/24.16.0
   installed : v24.16.0 (with npm 11.13.0)

After that, I ran

cd /var/www/peertube/peertube-latest/scripts && sudo -H -u peertube ./upgrade.sh

and restarted Peertube with systemctl restart peertube. Regrettably Peertube refuses to start up complaining about an outdated NodeJS version.

Jun 11 04:46:46 peertube systemd[1]: Started PeerTube daemon.
Jun 11 04:46:49 peertube peertube[3959624]: [bla:443] 2026-06-11 04:46:49.512 error: Error in NodeJS check. {
Jun 11 04:46:49 peertube peertube[3959624]:   "err": {
Jun 11 04:46:49 peertube peertube[3959624]:     "stack": "Error: Your NodeJS version v20.20.2 is not supported. Please upgrade to NodeJS 22 or NodeJS 24\n    at checkNodeVersion (file:///var
/www/peertube/versions/peertube-v8.2.0/dist/core/initializers/checker-before-init.js:317:15)\n    at file:///var/www/peertube/versions/peertube-v8.2.0/dist/server.js:20:5",
Jun 11 04:46:49 peertube peertube[3959624]:     "message": "Your NodeJS version v20.20.2 is not supported. Please upgrade to NodeJS 22 or NodeJS 24"
Jun 11 04:46:49 peertube peertube[3959624]:   }
Jun 11 04:46:49 peertube peertube[3959624]: }
Jun 11 04:46:49 peertube systemd[1]: peertube.service: Main process exited, code=exited, status=255/EXCEPTION
Jun 11 04:46:49 peertube systemd[1]: peertube.service: Failed with result 'exit-code'.
Jun 11 04:46:49 peertube systemd[1]: peertube.service: Consumed 4.379s CPU time.
Jun 11 04:46:49 peertube systemd[1]: peertube.service: Scheduled restart job, restart counter is at 24.
Jun 11 04:46:49 peertube systemd[1]: Stopped PeerTube daemon.
Jun 11 04:46:49 peertube systemd[1]: peertube.service: Consum

Apparently the old NodeJS version number is still registered somewhere, but how can I fix this?

3 messages - 2 participant(e)s

Lire le sujet en entier

  •  
❌