YunoHost-Apps / peertube_ynh

Federated (ActivityPub) video streaming platform using P2P for YunoHost
https://joinpeertube.org/fr/
GNU Affero General Public License v3.0
88 stars 28 forks source link

New install fails (6.0.2~ynh3) #421

Open MyNameIsTroll opened 8 months ago

MyNameIsTroll commented 8 months ago

Describe the bug

I had to uninstall the old version of peertube because I had a problem upgrading from 5.2.0 to 5.2.1 ynh1. When I try to install this new version (6.0.2~ynh3), the installation fails.

Context

Logs

https://paste.yunohost.org/raw/kalezerehe

makotoworkshop commented 8 months ago

Same here https://paste.yunohost.org/raw/rujilonexo

Context

ericgaspar commented 8 months ago

Did you try this solution proposed by Alex on the forum? https://forum.yunohost.org/t/cant-upgrade-peertube/27913/2

MyNameIsTroll commented 8 months ago

@ericgaspar not yet but i will try, thanks.

makotoworkshop commented 8 months ago

@ericgaspar , Β« It's work for me ! Β» Many ThanksΒ !

MyNameIsTroll commented 8 months ago

Good news for @makotoworkshop πŸ‘

Unfortunately, this doesn't work for me. @makotoworkshop You simply used the command : yunohost app setting peertube admin -v <some_admin_username> ?

This command doesn't produce anything for me because I've uninstalled peertube and the application is no longer on my server.

ericgaspar commented 8 months ago

This command doesn't produce anything for me because I've uninstalled peertube and the application is no longer on my server.

no problem then, just reinstall PeerTube from scratch

MyNameIsTroll commented 8 months ago

I've tried, but it doesn't work for me. I put the error logs on my first post.

ericgaspar commented 8 months ago

error peertube@6.0.2: The engine "node" is incompatible with this module. Expected version ">=18.x". Got "12.22.12" this error is strange... how did you end up by having Node 12 installed. We are using Node 18 -> https://github.com/YunoHost-Apps/peertube_ynh/blob/3ad9c8f2fb2221b039e0cc84786bffc05beddfe3/scripts/_common.sh#L7

oufmilo commented 8 months ago

Good news for @makotoworkshop πŸ‘

Unfortunately, this doesn't work for me. @makotoworkshop You simply used the command : yunohost app setting peertube admin -v <some_admin_username> ?

This command doesn't produce anything for me because I've uninstalled peertube and the application is no longer on my server.

It's work for me with this command πŸ‘

MyNameIsTroll commented 8 months ago

Great, another happy one :) @oufmilo πŸ‘

I don't understand why I have this problem with nodejs. Usually I administer everything with the yunohost web interface, I don't think I've messed with nodejs though.

Does anyone know a way to fix this?

I read a similar problem on the yunohost forum, but I don't know how to fix this problem. https://forum.yunohost.org/t/installation-hedgedoc-1-9-8-ynh2-nodejs/25542

makotoworkshop commented 8 months ago

Good news for @makotoworkshop πŸ‘

Unfortunately, this doesn't work for me. @makotoworkshop You simply used the command : yunohost app setting peertube admin -v <some_admin_username> ?

This command doesn't produce anything for me because I've uninstalled peertube and the application is no longer on my server.

Yes, just with is my admin username.

Have you try to restore the Yunohost backup (this automaticaly created by Yunohost before apply the upgrade, by the upgrading script process) ? Then you might be use the magical command ^^

tituspijean commented 8 months ago

@MyNameIsTroll it looks like the issue solely lies with Yarn vs Node vs NPM. Let's try installing the app with the changes made in the aforementioned PR: sudo yunohost app install https://github.com/YunoHost-Apps/peertube_ynh/tree/debug-yarn -f

🀞 Please share the logs if it fails again.

MyNameIsTroll commented 8 months ago

@tituspijean thanks, i'll try this and i feed you back πŸ‘

MyNameIsTroll commented 8 months ago

He failed again unfortunately: The logs: https://paste.yunohost.org/raw/ofoyacexus

tituspijean commented 8 months ago

Oops sorry, one small overlook. Try again with the same command :)

MyNameIsTroll commented 8 months ago

Hi @tituspijean I just tried it, but it didn't work:

https://paste.yunohost.org/raw/amaquvehot

tituspijean commented 8 months ago

In your CLI, can you run sudo which node and sudo which npm, and share the outputs?

If it is /usr/local/bin/node and /usr/local/bin/npm, then what is the output of sudo ls -la /usr/local/bin/{npm,node}?

MyNameIsTroll commented 8 months ago

@tituspijean of course :

sudo which node = /usr/local/bin/node
sudo which npm = /usr/local/bin/npm

sudo ls -la /usr/local/bin/{npm,node}:


-rwxr-xr-x 1 root root 82273584 Dec 25 06:25 /usr/local/bin/node
lrwxrwxrwx 1 root root       38 Dec 25 06:25 /usr/local/bin/npm -> ../lib/node_modules/npm/bin/npm-cli.js
tituspijean commented 8 months ago

OK, what's the output of node -v?

MyNameIsTroll commented 8 months ago

node -v : -bash: /usr/local/bin/node: No such file or directory

/usr/local/bin $ ls -lah

total 79M
drwxr-xr-x  2 root root 4.0K Dec 25 06:25 .
drwxr-xr-x 10 root root 4.0K Dec 25 22:29 ..
lrwxrwxrwx  1 root root   45 Dec 25 06:25 corepack -> ../lib/node_modules/corepack/dist/corepack.js
-rwxr-xr-x  1 root root  79M Dec 25 06:25 node
lrwxrwxrwx  1 root root   38 Dec 25 06:25 npm -> ../lib/node_modules/npm/bin/npm-cli.js
lrwxrwxrwx  1 root root   38 Dec 25 06:25 npx -> ../lib/node_modules/npm/bin/npx-cli.js

image

tituspijean commented 8 months ago

🀯 I concede I am lost now... I really cannot replicate your issue.

I have tried something else in the code. Can you run the command again?

MyNameIsTroll commented 8 months ago

Of course, no problem. I'll try again. Thanks for your help, I don't understand anything ^_^'

https://paste.yunohost.org/raw/razarugome

tituspijean commented 8 months ago

New fix added, let's try again. 🀞

MyNameIsTroll commented 8 months ago

Not yet, it seems ^^ https://paste.yunohost.org/raw/ihuwohodog

tituspijean commented 8 months ago

I'm utterly flabbergasted.

MyNameIsTroll commented 8 months ago

Me too... Thank you for your help. Don't waste your evening :)

lapineige commented 8 months ago
env PATH=/opt/node_n/n/versions/node/18/bin:/opt/node_n/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin corepack enable
DEBUG - /usr/bin/env: β€˜node’: No such file or directory

Node madness :(

kodxana commented 8 months ago

Just for your info PeerTube rquires NodeJS 18 from verison 6.0.0 https://github.com/Chocobozzz/PeerTube/releases/tag/v6.0.0 Read notes :)

lapineige commented 8 months ago

@kodxana Read the code ;) https://github.com/YunoHost-Apps/peertube_ynh/blob/master/scripts/_common.sh#L7

MadMan247 commented 5 months ago

Hello, I do not know if this applies here, but I did encounter this issue when attempting to install peertube 6.0.3 (maybe 6.0.4?) through the official documentation here. This issue occurred for me VERY SPECIFICALLY after trying to install yarn classic, which requires nodejs to work. I think (don't quote me) that the latest version of "nodejs", before being changed to "node" is that 12.22.X. (I used ubuntu, and for me it was 12.22.9) image Here, the command sudo apt update && sudo apt install yarn installs nodejs as a dependency, and the following line sudo apt update && sudo apt install --no-install-recommends yarn does not, but requires you to add the alias to use node as nodejs. For me, I still got stuck at this step, as sudo could still not properly find and use node/yarn. Thanks to yunohost, I still get my own peertube instance.

You may be able to remove the package 12.22.12 through the command line by removing the package "nodejs" (not "node")

KodeIn commented 3 months ago

I also have troubles with installing peertube again after uninstalling it. I wanted to move it to another sub domain. Here is the log of the new install: https://paste.yunohost.org/raw/suwitovebo

I tried to restore the old backup, but I got the same problems, looks like it doesn't find ffmpeg during service launch.

And the LDAP package used by the plugin has been decommissioned about 2 months ago by the maintainer. https://github.com/ldapjs/node-ldapjs/blob/8ffd0bc9c149088a10ec4c1ec6a18450f76ad05d/README.md