arteck / ioBroker.zigbee2mqtt

Adapter for Zigbee2MQTT integration
MIT License
24 stars 13 forks source link

Could not load the "sharp" module using the linux-x64 runtime #325

Closed Grizzelbee closed 3 months ago

Grizzelbee commented 4 months ago

What happened?

After adapter upgrade from 2.13.4 to 2.13.5 the adapter doesn't start and throws the error shown below in Log. Manually downgrading sharp to v0.32.6 (as in V2.13.4) in package.json solved it for the moment and the adapter gets running again.

This is a known issue to the sharp lib - but there isn't a quick and easy solution (as far as I discovered). https://github.com/lovell/sharp/issues/3911

The recommended npm install --os=linux --cpu=x64 sharp didn't solved it.

What did you expect to happen?

Adapter should still run on Linux x64 after upgrade. The same upgrade on Windows is working fine - without any issues.

How to reproduce it (minimal and precise)

Upgrade adapter on x64 Linux from version <= 2.13.4 to a version >=2.13.5 (2.13.6 is affected as well) In my case it's a debian AMDx64 Linux V12 (Bookworm).

Plattform: linux Betriebssystem: linux Architektur: x64 CPUs: 4 Geschwindigkeit: 2800 MHz Modell: Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz RAM: 15.5 GB System-Betriebszeit: 28 T. 20:01:37 Node.js: v18.19.0 NPM: 9.2.0 Adapter-Anzahl: 536 Datenträgergröße: 226.4 GB Freier Festplattenspeicher: 207.1 GB Aktive Instanzen: 37 Pfad: /opt/iobroker/

Adapter version

=2.13.5

Adapter Config Log

2024-03-27 13:04:12.281  - info: zigbee2mqtt.0 (3678478) starting. Version 2.13.5 in /opt/iobroker/node_modules/iobroker.zigbee2mqtt, node: v18.19.0, js-controller: 5.0.19
2024-03-27 13:04:12.293  - info: zigbee2mqtt.0 (3678478) ================================= Adapter Config =================================
2024-03-27 13:04:12.293  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Frontend Scheme: http
2024-03-27 13:04:12.294  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Frontend Server: callisto.hingsenlokal.de
2024-03-27 13:04:12.294  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Frontend Port: 8087
2024-03-27 13:04:12.294  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Connection Type: ws
2024-03-27 13:04:12.294  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Websocket Scheme: ws
2024-03-27 13:04:12.294  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Websocket Server: 127.0.0.1
2024-03-27 13:04:12.294  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Websocket Port: 8087
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Websocket Auth-Token: unused
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Websocket Dummy MQTT-Server: activated
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Dummy MQTT IP-Bind: 0.0.0.0
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Dummy MQTT Port: 1885
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Debug Log: deactivated
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Proxy Zigbee2MQTT Logs to ioBroker Logs: activated
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Use Kelvin: no
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Use ColorTemperature ColorSync: no
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Use BrightnessMove OnOff: no
2024-03-27 13:04:12.295  - info: zigbee2mqtt.0 (3678478) || Use BrightnessStep OnOff: no
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Use Event In Desc: yes
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Use Device Icons: no
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Use Simple Hold/Release State: yes
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Use Simple Move/Stop State: no
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Use Simple Press/Release State: no
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Use Automatic Coordinator Check: no
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Coordinator Check Loglevel: info
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) || Coordinator Check Cron : 0 3 * * *
2024-03-27 13:04:12.296  - info: zigbee2mqtt.0 (3678478) ==================================================================================
2024-03-27 13:04:12.321  - info: zigbee2mqtt.0 (3678478) Statring DummyMQTT-Server on IP 0.0.0.0 and Port 1885
2024-03-27 13:04:13.831  - info: zigbee2mqtt.0 (3678478) Connect to Zigbee2MQTT over websocket connection.
2024-03-27 13:04:13.845  - info: zigbee2mqtt.0 (3678478) ============================ Zigbee2MQTT Information =============================
2024-03-27 13:04:13.845  - info: zigbee2mqtt.0 (3678478) || Zigbee2MQTT Version: 1.35.3
2024-03-27 13:04:13.845  - info: zigbee2mqtt.0 (3678478) || Coordinator type: zStack3x0 Version: 20230507 Serial: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_c6e1fc64b2a4ed11b6cbf3a32981d5c7-if00-port0
2024-03-27 13:04:13.845  - info: zigbee2mqtt.0 (3678478) || Network panid 64259 channel: 11 ext_pan_id: 0x600db16b00bee5ff
2024-03-27 13:04:13.845  - info: zigbee2mqtt.0 (3678478) ==================================================================================

Log

2024-03-25 16:19:02.766  - error: host.callisto instance system.adapter.zigbee2mqtt.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]: /opt/iobroker/node_modules/sharp/lib/sharp.js:114
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]:   throw new Error(help.join('\n'));
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]:   ^
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]: Error: Could not load the "sharp" module using the linux-x64 runtime
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]: Possible solutions:
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]: - Ensure optional dependencies can be installed:
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]:     npm install --include=optional sharp
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]:     yarn add sharp --ignore-engines
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]: - Ensure your package manager supports multi-platform installation:
2024-03-25 16:19:33.471  - error: host.callisto Caught by controller[0]:     See https://sharp.pixelplumbing.com/install#cross-platform
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]: - Add platform-specific dependencies:
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     npm install --os=linux --cpu=x64 sharp
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]: - Consult the installation documentation:
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     See https://sharp.pixelplumbing.com/install
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Object.<anonymous> (/opt/iobroker/node_modules/sharp/lib/sharp.js:114:9)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module._compile (node:internal/modules/cjs/loader:1356:14)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module.load (node:internal/modules/cjs/loader:1197:32)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module._load (node:internal/modules/cjs/loader:1013:12)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module.require (node:internal/modules/cjs/loader:1225:19)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at require (node:internal/modules/helpers:177:18)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Object.<anonymous> (/opt/iobroker/node_modules/sharp/lib/constructor.js:10:1)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module._compile (node:internal/modules/cjs/loader:1356:14)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]:     at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
2024-03-25 16:19:33.472  - error: host.callisto Caught by controller[0]: Node.js v18.19.0
arteck commented 3 months ago

problem is a external dependency.. i cant resolve this problem ..sry

kleenkanteen commented 2 months ago

Downgrading sharp to 0.32.6 doesn't work for me, still getting build error on vercel for a astro project. My solution is here: https://github.com/itgalaxy/favicons/issues/448