[Solved] Peertube s'est désinstalé tout seul et refuse de se réinstaller

ls -la /home/yunohost.app/peertube/storage/plugins/
total 128
drwxr-xr-x 4 peertube www-data 4096 Jun 8 11:41 .
drwxr-x— 20 peertube www-data 4096 Jun 8 11:44 ..
drwxr-xr-x 5 peertube www-data 4096 Feb 17 12:55 data
drwxr-xr-x 280 peertube www-data 12288 Apr 7 14:44 node_modules
-rw-r–r-- 1 peertube www-data 131 Feb 17 12:55 package.json
-rw-r–r-- 1 peertube www-data 97911 Apr 14 09:27 pnpm-lock.yaml
-rw-r–r-- 1 peertube www-data 52 Feb 17 10:23 pnpm-workspace.yaml

et pour la table dans la base de données ?

sudo -u postgres psql -d peertube -c "SELECT name, uninstalled FROM plugin;"

Si le plugin tv-streaming apparaît désinstallé dans la BDD, tu peux essayer ceci

yunohost app shell peertube
NODE_CONFIG_DIR=/var/www/peertube/config   NODE_ENV=production   pnpm run plugin:uninstall --npm-name peertube-plugin-tv-streaming

et revérifier ensuite

ls -la /home/yunohost.app/peertube/storage/plugins/node_modules/ |   grep peertube-plugin-*
grep "peertube-plugin-" /home/yunohost.app/peertube/storage/plugins/package.json
grep "peertube-plugin-" /home/yunohost.app/peertube/storage/plugins/pnpm-lock.yaml

Alors j’ai d’abord ceci :

sudo -u postgres psql -d peertube -c "SELECT name, uninstalled FROM plugin;"
     name     | uninstalled
--------------+-------------
 auth-ldap    | f
 livechat     | f
 tv-streaming | t
(3 rows)

Et ensuite la commande pour désinstaller le module ne fonctionne pas :

peertube@...:~$ NODE_CONFIG_DIR=/var/www/peertube/config   NODE_ENV=production   npm run plugin:uninstall -- --npm-name peertube-plugin-tv-streaming

> peertube@8.1.5 plugin:uninstall
> node ./dist/scripts/plugin/uninstall.js --npm-name peertube-plugin-tv-streaming

[...] 2026-06-09 07:29:29.902 info: Uninstalling plugin peertube-plugin-tv-streaming.
[...] 2026-06-09 07:29:29.916 error: Cannot uninstall plugin peertube-plugin-tv-streaming: it does not exist or is already uninstalled.
peertube@...:~$ ls -la /home/yunohost.app/peertube/storage/plugins/node_modules/ |   grep peertube-plugin-*
drwxr-xr-x   2 peertube www-data  4096 Feb 17 10:23 peertube-plugin-auth-ldap
drwxr-xr-x  14 peertube www-data  4096 Feb 17 10:23 peertube-plugin-livechat
drwxr-xr-x   5 peertube www-data  4096 Feb 17 12:54 peertube-plugin-tv-streaming

Le plugin est-il toujours référencé dans ces deux fichiers ?

grep "peertube-plugin-" /home/yunohost.app/peertube/storage/plugins/package.json
grep "peertube-plugin-" /home/yunohost.app/peertube/storage/plugins/pnpm-lock.yaml



Oui

Voici ce que je tenterais mais c’est beaucoup plus invasif et le risque est de passer d’une instance fonctionnelle non à jour à une instance complètement cassée.
C’est sans aucune garantie de succès et ton instance a un problème que je n’arrive pas à comprendre (le résultat de la désinstallation en ligne de commande est curieux).

  1. Sauvegarde complète de peertube (incluant donc le dossier des données)
  2. Sauvegarde de /home/yunohost.app/peertube/storage/plugins dans un autre dossier (ex cp -pr /home/yunohost.app/peertube/storage/plugins /home/ton_user/peertube_plugins_backup)
  3. supprimer la référence à tv streaming dans package.json
yunohost app shell peertube
cd /home/yunohost.app/peertube/storage/plugins # bien s'assurer d'être dans ce dossier
nano package.json

le contenu final doit ressembler à cela (en y ajoutant éventuellement les autres plugins que tu as installés -l’important étant de ne pas laisser traîner de virgule à la fin-)

{
  "dependencies": {
    "peertube-plugin-auth-ldap": "0.0.14",
    "peertube-plugin-livechat": "14.0.2" 
  }
}
  1. supprimer le plugin dans les modules, le lock file et régénérer ce dernier
cd /home/yunohost.app/peertube/storage/plugins # bien s'assurer d'être dans ce dossier
rm -rf node_modules/peertube-plugin-tv-streaming
rm pnpm-lock.yaml
pnpm install -no-frozen-lockfile

Retenter ensuite l’upgrade.

It worked!

Thanks a lot.