From 1e59c934ec0ce5a97bcd4f4cd5c31be8ee24bacc Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 10 May 2025 08:42:45 +0200 Subject: [PATCH] Jellyseerr: better handling of node and pnpm (#4365) * Jellyseerr: better handling of node and pnpm * Update jellyseerr.sh --- ct/jellyseerr.sh | 6 +++--- install/jellyseerr-install.sh | 14 +------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/ct/jellyseerr.sh b/ct/jellyseerr.sh index 97b599391..d0afda87c 100644 --- a/ct/jellyseerr.sh +++ b/ct/jellyseerr.sh @@ -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 @@ -103,4 +103,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5055${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5055${CL}" diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index bb855b379..5ceba13a9 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -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