fix(flowiseai): update_script: switch npm to pnpm, fix service ExecStart

- Use pnpm add -g instead of npm install -g (apify-client enforces pnpm)
- Call setup_nodejs to ensure pnpm is available in existing containers
- Migrate ExecStart from 'npx flowise start' to 'flowise start' in
  existing installations on update
This commit is contained in:
MickLesk
2026-05-08 21:47:51 +02:00
parent 03aa4228b9
commit 52b7266db2

View File

@@ -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!"