Does not work P2P resets to HTTP

The video does not start and the following information is shown

peertube-p2p

After a while, it starts showing in http mode

Can you tell me where to look for the problem?

The problem was in the version yarn put 1.22.5! The new version gave the problem.

Rocky Linux 8.4

#sudo npm install --global yarn - it doesn’t work!

Working version!
#curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
#curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -
#sudo dnf install yarn