diff --git a/ct/zigbee2mqtt.sh b/ct/zigbee2mqtt.sh index 9f679fe6..abb11a3c 100644 --- a/ct/zigbee2mqtt.sh +++ b/ct/zigbee2mqtt.sh @@ -57,6 +57,13 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi + if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then + if ! command -v npm >/dev/null 2>&1; then + echo "Installing NPM..." + apt-get install -y npm >/dev/null 2>&1 + echo "Installed NPM..." + fi + fi cd /opt/zigbee2mqtt stop_zigbee2mqtt() {