1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-05-10 16:03:07 +00:00

Jellyseerr: better handling of node and pnpm (#4365)

* Jellyseerr: better handling of node and pnpm

* Update jellyseerr.sh
This commit is contained in:
CanbiZ 2025-05-10 08:42:45 +02:00 committed by GitHub
parent 456b00882d
commit 1e59c934ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 16 deletions

View File

@ -53,10 +53,10 @@ function update_script() {
if [ -z "$pnpm_current" ]; then
msg_error "pnpm not found. Installing version $pnpm_desired..."
$STD npm install -g pnpm@"$pnpm_desired"
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" install_node_and_modules
elif ! node -e "const semver = require('semver'); process.exit(semver.satisfies('$pnpm_current', '$pnpm_desired') ? 0 : 1)"; then
msg_error "Updating pnpm from version $pnpm_current to $pnpm_desired..."
$STD npm install -g pnpm@"$pnpm_desired"
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" install_node_and_modules
else
msg_ok "pnpm is already installed and satisfies version $pnpm_desired."
fi

View File

@ -15,30 +15,18 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
gnupg \
git \
build-essential
msg_ok "Installed Dependencies"
msg_info "Setting up Node.js Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
msg_ok "Set up Node.js Repository"
msg_info "Installing Node.js"
$STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Installed Node.js"
git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr
cd /opt/jellyseerr
$STD git checkout main
pnpm_desired=$(grep -Po '"pnpm":\s*"\K[^"]+' /opt/jellyseerr/package.json)
msg_info "Installing pnpm version $pnpm_desired..."
$STD npm install -g pnpm@$pnpm_desired
msg_ok "Installed pnpm"
NODE_VERSION="22" NODE_MODULE="pnpm@$pnpm_desired" install_node_and_modules
msg_info "Installing Jellyseerr (Patience)"
export CYPRESS_INSTALL_BINARY=0