tkurki / signalk-mqtt-gw

Signal K server plugin that provides gateway functionality between Signal K and MQTT
Apache License 2.0
14 stars 7 forks source link

Old version of nan prevents building on Node 10.15 #26

Closed mrobst closed 3 years ago

mrobst commented 3 years ago

I just upgraded signalk from 1.35 to 1.38 and then upgraded a few plugins including signalk-mqtt-gw. Now when I run signalk I get message "Could not locate the bindings file. Tried: → /usr/lib/node_modules/signalk-serv..." for my serial->usb connctions. Tracked this down to a error shown by node-gyp which in turn comes from nan dependency. I think the erelated issue stating nan >= 2.10 is required on Node v10 is : https://github.com/nodejs/nan/issues/763

Looking at my nan depenencies per list below I think the issues are coming from snappy/zmq and in turn from mosca in singnalk-mqtt-gw so logging issue here so you can take a look.

cheers Marcus

$ npm list nan
signalk-server-config@0.0.1 /home/pi/.signalk
├─┬ @signalk/vedirect-serial-usb@1.1.0
│ └─┬ serialport@9.0.7
│   └─┬ @serialport/bindings@9.0.7
│     └── nan@2.14.2  deduped
├─┬ signalk-mqtt-gw@1.3.4
│ ├─┬ mdns@2.7.2
│ │ └── nan@2.14.2
│ └─┬ mosca@2.8.3
│   ├─┬ ascoltatori@3.2.0
│   │ ├─┬ kafka-node@0.5.9
│   │ │ └─┬ snappy@5.0.5
│   │ │   └── nan@2.3.5
│   │ ├─┬ kerberos@0.0.24
│   │ │ └── nan@2.10.0
│   │ ├─┬ qlobber-fsq@3.2.4
│   │ │ └─┬ fs-ext@0.5.0
│   │ │   └── nan@2.14.2  deduped
│   │ └─┬ zmq@2.15.3
│   │   └── nan@2.3.5
│   └─┬ leveldown@1.4.6
│     └── nan@2.3.5
└─┬ signalk-raspberry-pi-bme280@1.1.1
  └─┬ bme280-sensor@0.1.6
    └─┬ i2c-bus@1.2.5
      └── nan@2.8.0
tkurki commented 3 years ago

Mosca is really getting old. The real fix would be to remove the embedded server feature, but there is no easy way to do that in a controlled manner.

How exactly is the offending nan version confusing node-gyp?

tkurki commented 3 years ago

I just checked on a Pi that I had preinstalled with 1.37 a little over a week ago and now I installed signalk-mqtt-gw on it. All of them: leveldown, zmq and fs-ext are not there, status UNMET OPTIONAL DEPENDENCY. So them being optional you should be able to just remove them and still be ok.

Not that that fixes the real problem, but as a workaround.

mrobst commented 3 years ago

OK thanks I've managed to get the server running again so will close this issue