fix(metube): use pnpm + corepack for frontend build (#10392)

This commit is contained in:
CanbiZ (MickLesk)
2025-12-29 00:38:05 +01:00
committed by GitHub
parent a471006c3d
commit 1d278f53f6
2 changed files with 15 additions and 5 deletions

View File

@@ -40,6 +40,8 @@ function update_script() {
fi fi
fi fi
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
if check_for_gh_release "metube" "alexta69/metube"; then if check_for_gh_release "metube" "alexta69/metube"; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop metube systemctl stop metube
@@ -56,8 +58,12 @@ function update_script() {
msg_info "Building Frontend" msg_info "Building Frontend"
cd /opt/metube/ui cd /opt/metube/ui
$STD npm install if command -v corepack >/dev/null 2>&1; then
$STD node_modules/.bin/ng build $STD corepack enable
$STD corepack prepare pnpm --activate || true
fi
$STD pnpm install --frozen-lockfile
$STD pnpm run build
msg_ok "Built Frontend" msg_ok "Built Frontend"
PYTHON_VERSION="3.13" setup_uv PYTHON_VERSION="3.13" setup_uv

View File

@@ -23,7 +23,7 @@ $STD apt install -y \
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
PYTHON_VERSION="3.13" setup_uv PYTHON_VERSION="3.13" setup_uv
NODE_VERSION="24" setup_nodejs NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
msg_info "Installing Deno" msg_info "Installing Deno"
export DENO_INSTALL="/usr/local" export DENO_INSTALL="/usr/local"
@@ -37,8 +37,12 @@ fetch_and_deploy_gh_release "metube" "alexta69/metube" "tarball" "latest"
msg_info "Installing MeTube" msg_info "Installing MeTube"
cd /opt/metube/ui cd /opt/metube/ui
$STD npm ci if command -v corepack >/dev/null 2>&1; then
$STD node_modules/.bin/ng build --configuration production $STD corepack enable
$STD corepack prepare pnpm --activate || true
fi
$STD pnpm install --frozen-lockfile
$STD pnpm run build
cd /opt/metube cd /opt/metube
$STD uv sync $STD uv sync
mkdir -p /opt/metube_downloads /opt/metube_downloads/.metube /opt/metube_downloads/music /opt/metube_downloads/videos mkdir -p /opt/metube_downloads /opt/metube_downloads/.metube /opt/metube_downloads/music /opt/metube_downloads/videos