Problems updating peertube from 5.0 to 5.2

When i try to upgrade my dev environment from v5.0 to v5.2 I get an error running the upgrade script:

root@werkvm3:~# sudo ~/PeerTube/scripts/
Backing up PostgreSQL database in /var/www/peertube/backup/sql-peertube_prod-20230829-1726.bak
throw err;

Error: Cannot find module ‹ js-yaml ›
Require stack:

  • /root/[eval]
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at [eval]:1:13
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:313:38)
    at node:internal/process/execution:79:19
    at [eval]-wrapper:6:22
    at evalScript (node:internal/process/execution:78:60) {
    code: ‹ MODULE_NOT_FOUND ›,
    requireStack: [ ‹ /root/[eval] › ]

Can anybody help me fix this so i can update my environment.

T. Boer


Did you follow the upgrade guide? Production guide | PeerTube documentation
You should use the script from /var/www/peertube/peertube-latest/scripts