Which version of Node.js should I use for (Homey Pro) App development on macOS?

In the past I helped the author of the SolarPanels App by creating a driver for Growatt inverters. This driver no longer seems to be able to log in to the Growatt servers. I want to investigate this issue, but homey app run fails, because this command fails:

command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

Maybe the version of Node.js that I use on my Mac (v19.0.1) is too new and not supported yet?

I think Homey Pro Apps stil use Node 12, but Homebrew refuses to install that because it is no longer supported…

What version of Node.js do other developers use on macOS?

That’s not really relevant here (I use v19 myself), what’s more important is that it’s trying to build a C++ addon that won’t run on Homey anyway (and is also not required). If it’s possible to remove the requirement on serialport in the app, that would be the best; otherwise, it would be useful if you posted the error log (it’s likely missing an external dependency, like Python or a C++ compiler).

FWIW, Homey apps run on Node.js v16 and Homey’s core runs on v12 (I guess Athom couldn’t get their own code to run on v16…).

It’s not my App (so I’m not familiar with all aspects), but it looks like the Huawei driver is using modbus-serial.

Since I want to debug the Growatt driver, I’ll try just disabling the Huawei driver and removing that dependency at my next attempt (tonight?).

That worked! App installed without any issues…

1 Like