forked from hobbyquaker/ioBroker.cul
-
Notifications
You must be signed in to change notification settings - Fork 14
Issues after nodejs upgrade
EvilEls edited this page Dec 8, 2021
·
1 revision
It may occur, that after an upgrade of nodejs (like 12.x > 14.x) the instance of the adapter no longer starts reporting a similar error:
cul.0 | 2021-12-08 12:37:15.438 | error | Cannot open port: TypeError: SerialPort is not a constructor
cul.0 | 2021-12-08 12:37:15.402 | info | starting. Version 1.3.5 in /opt/iobroker/node_modules/iobroker.cul, node: v14.18.2, js-controller: 3.3.21
In such a case, please confirm your device uses the correct serial port. You can do it for example by unpluging it and plug it in again, followed by
dmesg | grep tty
It will return something like
[ 672.794475] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 687.127955] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
revealing the serial port of your device. (ttyUSB0
in this example)
After that do
cd /opt/iobroker/node_modules/serialport/
npm i --production
The instance should now work again.