In the latest update, when importing a flow, it asks the user if they want to also install the nodes that the flow uses.
Is there any way to do this without a separate process or bootstrap script? I don’t want to check in the node_modules directory into the repo.
Here’s my docker compose solution currently:
services:
nodered-deps:
image: node:22-bookworm-slim
container_name: nodered-deps
working_dir: /data
environment:
- npm_config_cache=/data/.npm
volumes:
- ./volumes/nodered:/data
command: >
bash -lc '
set -euo pipefail
if [ -f package-lock.json ]; then
echo "[deps] npm ci"
npm ci
elif [ -f package.json ]; then
echo "[deps] npm install"
npm install --omit=dev --no-audit --no-fund
else
echo "[deps] no package.json; skipping"
fi
'
nodered:
image: nodered/node-red:4.1.0-22
container_name: nodered
restart: unless-stopped
ports:
- "1880:1880"
environment:
- TZ=UTC
env_file:
- .env
volumes:
- ./volumes/nodered:/data
depends_on:
nodered-deps:
condition: service_completed_successfully