Compare commits

...

3 Commits

Author SHA1 Message Date
MickLesk
c4adc1c99c fix(flowiseai): ensure setup_nodejs is called before updating FlowiseAI 2026-05-08 21:48:50 +02:00
MickLesk
52b7266db2 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
2026-05-08 21:47:51 +02:00
MickLesk
03aa4228b9 fix(flowiseai): switch from npm to pnpm for installation
apify-client (transitive dependency of Flowise) enforces pnpm via
a preinstall hook: 'npx only-allow pnpm'. This causes npm install -g
to fail with exit code 254 because the only-allow check detects npm
is being used.

Switch to pnpm add -g to satisfy the enforced package manager
requirement. Also replace 'npx flowise start' with 'flowise start'
in the service since the pnpm global binary is directly accessible
in PATH after setup_nodejs.

Fixes #14330
2026-05-08 21:45:08 +02:00
2 changed files with 11 additions and 4 deletions

View File

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

View File

@@ -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]