“hb-service update-node” fails after updating homebridge repository to 1.1.2
buzz-dee81 opened this issue · 3 comments
buzz-dee81 commented
Analysis
I have homebridge running on my pi4. It was setup via the method described here.
After upgrading from version 1.1.1 to 1.1.2 the “hb-service update-node” command fails with the error message
(Rebuilding for Node. js v20.9.0...
/bin/sh: 1: npm: not found
/bin/sh: 1: npm: not found
Error: Command failed: npm rebuild --unsafe-perm
so I downgraded to homebridge v1.1.1 again with
sudo apt install homebridge=1.1.1
after that “hb-service update-node” finishes without any error.
I know that the failed try was executed inside hb-service shell while the successful one was inside the regular user shell. But I tried it both ways and it still failed with the same error.
Expected Behavior
hb-service update-node should update node.js to the latest version without errors
Steps To Reproduce
- Update to v1.1.2
sudo apt install homebridge=1.1.2
- Try to update node
sudo hb-service update-node
Logs
homebridge@raspberrypi:/var/lib/homebridge $ hb-service update-node
ℹ Updating Node.js from v18.18.2 to v20.9.0...
ℹ Target: /opt/homebridge
✔ Download complete.
✔ Cleaned up npm at at /opt/homebridge/lib/node_modules/npm
✔ Installed Node.js v20.9.0
ℹ Rebuilding for Node.js v20.9.0...
/bin/sh: 1: npm: not found
/bin/sh: 1: npm: not found
Error: Command failed: npm rebuild --unsafe-perm
✖ ERROR: Failed Operation
⚠ Please restart Homebridge for the changes to take effect.
Configuration
{
"accessories": [
{
"accessory": "marantz-volume",
"mapMaxVolumeTo100": "true",
"controlMute": "true",
"host": "",
"maxVolume": "40",
"name": "Lautstärke"
},
{
"zone": "2",
"accessory": "marantz-volume",
"mapMaxVolumeTo100": "true",
"host": "",
"maxVolume": "70",
"controlPower": "true",
"name": "Lautstärke2"
},
{
"name": "Pihole",
"ssl": false,
"rejectUnauthorized": true,
"host": "",
"port": 80,
"baseDirectory": "/admin/",
"time": 60,
"reversed": true,
"logLevel": 2,
"accessory": "Pihole"
},
{
"accessory": "CmdTrigger",
"name": "FR24 Satus",
"command": "cd /home/pi/bin/ && ./fr24.sh",
"delay": "1000",
"execAfterDelay": false
},
{
"accessory": "CmdTrigger",
"name": "Piaware Status",
"command": "cd /home/pi/bin/ && ./piaware.sh",
"execAfterDelay": false
},
{
"accessory": "CmdTrigger",
"name": "Systembericht",
"command": "cd /home/pi/bin && ./telegram",
"execAfterDelay": false
},
{
"name": "Alarmanlage",
"default_mode": "Off",
"arm_seconds": 10,
"trigger_seconds": 0,
"reset_minutes": 10,
"audio": false,
"audio_language": "de-DE",
"save_state": true,
"proxy_mode": false,
"test_mode": false,
"override_off": false,
"reset_off_flow": false,
"siren_sensor": false,
"siren_sensor_seconds": 5,
"reset_sensor": false,
"mode_switches": true,
"mode_off_switch": true,
"mode_pause_switch": false,
"pause_minutes": 0,
"siren_switch": false,
"siren_mode_switches": false,
"audio_volume": "100",
"audio_arming_looped": false,
"audio_alert_looped": false,
"accessory": "security-system"
}
],
"bridge": {
"username": "",
"name": "Homebridge",
"pin": "",
"port": 51635,
"advertiser": "ciao",
"bind": [
"eth0"
]
},
"platforms": [
{
"name": "HarmonyHub",
"hubIP": "",
"cleanCache": false,
"publishAllTVAsExternalAccessory": true,
"TVAccessory": true,
"mainActivity": "Fernsehen",
"publishGeneralVolumeSlider": false,
"showCommandsAtStartup": false,
"platform": "HarmonyHubWebSocket"
},
{
"name": "Config",
"port": 8085,
"auth": "none",
"theme": "blue-grey",
"tempUnits": "c",
"lang": "auto",
"debug": true,
"standalone": true,
"sessionTimeout": 28800,
"platform": "config"
},
{
"platform": "FRITZ!Box",
"name": "",
"username": "",
"password": "",
"url": "",
"devices": {
"wifi": {
"name": "Guest WLAN",
"display": false
}
},
"options": {
"strictSSL": false
}
},
{
"refreshToken": "",
"hideLightGroups": true,
"hideDoorbellSwitch": true,
"hideCameraMotionSensor": false,
"hideCameraSirenSwitch": true,
"hideInHomeDoorbellSwitch": true,
"hideAlarmSirenSwitch": true,
"hideUnsupportedServices": true,
"debug": true,
"cameraStatusPollingSeconds": 15,
"cameraDingsPollingSeconds": 2,
"locationModePollingSeconds": 0,
"platform": "Ring"
},
{
"platform": "Shelly",
"name": "Shelly",
"_bridge": {
"username": "CC:22:3D:E3:CE:33",
"port": 51850
}
},
{
"name": "FritzPlatform",
"debug": false,
"warn": true,
"error": true,
"extendedError": true,
"devices": [
{
"active": true,
"name": "",
"host": "",
"username": "",
"password": "",
"ssl": true,
"tr064": true,
"igd": false,
"manufacturer": "AVM",
"model": "FritzBox Cable 6951",
"wifiUnits": 2,
"master": true,
"connection": "cable",
"options": {
"wifi_2ghz": "switch",
"wifi_5ghz": "switch",
"wifi_guest": "switch",
"wps": "switch",
"led": "switch"
}
},
{
"active": true,
"name": "",
"host": "",
"username": "",
"password": "",
"ssl": true,
"tr064": true,
"igd": false,
"manufacturer": "AVM",
"model": "Fritz Repeater 2400",
"wifiUnits": 2,
"master": false,
"connection": "repeater",
"options": {
"wifi_2ghz": "switch",
"wifi_5ghz": "switch",
"led": "switch"
}
},
{
"active": true,
"name": "",
"host": "",
"username": "",
"password": "",
"ssl": true,
"tr064": true,
"igd": false,
"manufacturer": "AVM",
"model": "Fritz Repeater 2400",
"wifiUnits": 2,
"master": false,
"connection": "repeater",
"options": {
"wifi_2ghz": "switch",
"wifi_5ghz": "switch",
"led": "switch"
}
},
{
"active": true,
"name": "",
"host": "",
"username": "",
"password": "",
"ssl": true,
"tr064": true,
"igd": false,
"manufacturer": "AVM",
"model": "Fritz Repeater 2400",
"wifiUnits": 2,
"connection": "repeater",
"options": {
"wifi_2ghz": "switch",
"wifi_5ghz": "switch",
"led": "switch"
}
}
],
"callmonitor": {
"active": false,
"port": 1012
},
"extras": {
"alarm": {
"active": false
},
"wakeup": {
"active": false
},
"ringlock": {
"active": false
},
"phoneBook": {
"active": false
}
},
"options": {
"polling": {
"timer": 10
}
},
"telegram": {
"active": true,
"token": "",
"chatID": "",
"messages": {
"reboot": {
"start": "FritzBox Neustart",
"finish": "FritzBox wieder online"
}
}
},
"platform": "FritzPlatform"
}
],
"disabledPlugins": []
}
Environment
- OS: Debian GNU/Linux 11 (bullseye) 64bit
Linux raspberrypi 6.1.61-v8+ 1696 SMP PREEMPT Thu Nov 2 16:44:46 GMT 2023 aarch64 GNU/Linux - Homebridge: 1.7.0
- Node: v20.9.0
- npm: 10.1.0
Process Supervisor
hb-service
Additional Context
No response
NorthernMan54 commented
This is resolved with 4.52.3
buzz-dee81 commented
Just installed 4.52.3
Works like a Charme 👍
NorthernMan54 commented
Tks for confirming