diff --git a/ct/flowiseai.sh b/ct/flowiseai.sh index 0dea7fc76..59e068f1e 100644 --- a/ct/flowiseai.sh +++ b/ct/flowiseai.sh @@ -27,9 +27,16 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + + NODE_VERSION="20" NODE_MODULE="pnpm" setup_nodejs + msg_info "Updating FlowiseAI (this may take some time)" systemctl stop flowise - $STD npm install -g flowise --upgrade + $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!" diff --git a/install/flowiseai-install.sh b/install/flowiseai-install.sh index bf47ab06e..81c40b827 100644 --- a/install/flowiseai-install.sh +++ b/install/flowiseai-install.sh @@ -13,10 +13,10 @@ setting_up_container network_check update_os -NODE_VERSION="20" setup_nodejs +NODE_VERSION="20" NODE_MODULE="pnpm" setup_nodejs msg_info "Installing FlowiseAI (Patience)" -$STD npm install -g flowise \ +$STD pnpm add -g flowise \ @opentelemetry/exporter-trace-otlp-grpc \ @opentelemetry/exporter-trace-otlp-proto \ @opentelemetry/sdk-trace-node \ @@ -33,7 +33,7 @@ After=network.target [Service] EnvironmentFile=/opt/flowiseai/.env -ExecStart=npx flowise start +ExecStart=flowise start Restart=always [Install]