diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index 0dea7fc76..9b79a8a0d 100644 --- a/ct/flowiseai.sh +++ b/ct/flowiseai.sh @@ -29,7 +29,12 @@ function update_script() { fi msg_info "Updating FlowiseAI (this may take some time)" systemctl stop flowise - $STD npm install -g flowise --upgrade + NODE_VERSION="20" NODE_MODULE="pnpm" setup_nodejs + $STD pnpm add -g flowise + if grep -q 'ExecStart=npx flowise start' /etc/systemd/system/flowise.service; then + sed -i 's|ExecStart=npx flowise start|ExecStart=flowise start|' /etc/systemd/system/flowise.service + systemctl daemon-reload + fi systemctl start flowise msg_ok "Updated FlowiseAI" msg_ok "Updated successfully!"