Compare commits

..

1 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
aee9f8fbc1 fix(tools.func): pin npm to 11.11.0 to work around Node.js 22.22.2 regression
Node.js 22.22.2 ships with a broken npm self-upgrade path where 'npm install -g npm@latest' fails with MODULE_NOT_FOUND for promise-retry. Pin to npm@11.11.0 as a known-good version until the upstream issue is resolved. Ref: nodejs/node#62425, npm/cli#9151
2026-03-26 09:50:45 +01:00
4 changed files with 11 additions and 13 deletions

View File

@@ -426,8 +426,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-03-26
## 2026-03-25
### 🚀 Updated Scripts

View File

@@ -304,7 +304,7 @@ setup_yq() {
url="https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${arch}"
tmp="$(mktemp)"
download_with_progress "$url" "$tmp" || return 1
/usr/bin/install -m 0755 "$tmp" /usr/local/bin/yq
install -m 0755 "$tmp" /usr/local/bin/yq
rm -f "$tmp"
msg_ok "Setup yq ($(yq --version 2>/dev/null))"
}
@@ -376,10 +376,10 @@ setup_uv() {
# tar contains ./uv
if [ -x "$tmpd/uv" ]; then
/usr/bin/install -m 0755 "$tmpd/uv" "$UV_BIN"
install -m 0755 "$tmpd/uv" "$UV_BIN"
else
# fallback: in subfolder
/usr/bin/install -m 0755 "$tmpd"/*/uv "$UV_BIN" 2>/dev/null || {
install -m 0755 "$tmpd"/*/uv "$UV_BIN" 2>/dev/null || {
msg_error "uv binary not found in tar"
rm -rf "$tmpd"
return 1

View File

@@ -1642,7 +1642,7 @@ maybe_offer_save_app_defaults() {
if whiptail --backtitle "Proxmox VE Helper Scripts" \
--yesno "Save these advanced settings as defaults for ${APP}?\n\nThis will create:\n${app_vars_path}" 12 72; then
mkdir -p "$(dirname "$app_vars_path")"
/usr/bin/install -m 0644 "$new_tmp" "$app_vars_path"
install -m 0644 "$new_tmp" "$app_vars_path"
msg_ok "Saved app defaults: ${app_vars_path}"
fi
rm -f "$new_tmp" "$diff_tmp"
@@ -1676,7 +1676,7 @@ maybe_offer_save_app_defaults() {
case "$sel" in
"Update Defaults")
/usr/bin/install -m 0644 "$new_tmp" "$app_vars_path"
install -m 0644 "$new_tmp" "$app_vars_path"
msg_ok "Updated app defaults: ${app_vars_path}"
break
;;

View File

@@ -6233,8 +6233,8 @@ function setup_nodejs() {
ensure_apt_working || return 1
# Just update npm to latest
$STD npm install -g npm@latest 2>/dev/null || true
# Pin npm to 11.11.0 to work around Node.js 22.22.2 regression (nodejs/node#62425)
$STD npm install -g npm@11.11.0 2>/dev/null || true
cache_installed_version "nodejs" "$NODE_VERSION"
msg_ok "Update Node.js $NODE_VERSION"
@@ -6298,12 +6298,12 @@ function setup_nodejs() {
return 1
fi
# Update to latest npm (with version check to avoid incompatibility)
# Pin npm to 11.11.0 to work around Node.js 22.22.2 regression (nodejs/node#62425)
local NPM_VERSION
NPM_VERSION=$(npm -v 2>/dev/null || echo "0")
if [[ "$NPM_VERSION" != "0" ]]; then
$STD npm install -g npm@latest 2>/dev/null || {
msg_warn "Failed to update npm to latest version (continuing with bundled npm $NPM_VERSION)"
$STD npm install -g npm@11.11.0 2>/dev/null || {
msg_warn "Failed to update npm to 11.11.0 (continuing with bundled npm $NPM_VERSION)"
}
fi
@@ -7942,7 +7942,7 @@ function setup_uv() {
return 1
fi
$STD /usr/bin/install -m 755 "$UV_BINARY" "$UV_BIN" || {
$STD install -m 755 "$UV_BINARY" "$UV_BIN" || {
msg_error "Failed to install uv binary"
return 1
}