mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-03 17:35:54 +00:00
refactor(n8n): simplify update to npm update, clean install deps
Update script: - Replace aggressive rm + npm install --force with npm update -g n8n which is the official recommended way to update n8n - Keep legacy migration (env file) and ensure_dependencies Install script: - Remove unnecessary build-essential, python3, python3-setuptools (n8n ships pre-built binaries, no native compilation needed) - Remove ca-certificates (already provided by base image) - Remove patch-package (not used) - Use npm install -g instead of --global for consistency Closes #12250
This commit is contained in:
18
ct/n8n.sh
18
ct/n8n.sh
@@ -41,19 +41,5 @@ EOF
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Updating ${APP} LXC"
|
||||
rm -rf /usr/lib/node_modules/.n8n-* /usr/lib/node_modules/n8n
|
||||
$STD npm install -g n8n --force
|
||||
systemctl restart n8n
|
||||
msg_ok "Updated successfully!"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
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}:5678${CL}"
|
||||
msg_info "Updating ${APP}"
|
||||
$STD npm update -g n8n
|
||||
|
||||
@@ -15,18 +15,13 @@ update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
ca-certificates \
|
||||
build-essential \
|
||||
python3 \
|
||||
python3-setuptools \
|
||||
graphicsmagick
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Installing n8n (Patience)"
|
||||
$STD npm install --global patch-package
|
||||
$STD npm install --global n8n
|
||||
$STD npm install -g n8n
|
||||
msg_ok "Installed n8n"
|
||||
|
||||
msg_info "Creating Service"
|
||||
|
||||
Reference in New Issue
Block a user