I’m using lts node installed with asdf, I tried with the raspian node version as well and ended up with same issue
pi@raspberrypi:~/plexamp $ node --version
v16.15.1
pi@raspberrypi:~/plexamp $ node js/index.js
node:internal/modules/cjs/loader:1189
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /home/pi/plexamp/treble/treble.node: wrong ELF class: ELFCLASS64
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.41673 (/home/pi/plexamp/js/index.js:2:332509)
at a (/home/pi/plexamp/js/index.js:2:2015750)
at Object.65631 (/home/pi/plexamp/js/index.js:2:327124)
at a (/home/pi/plexamp/js/index.js:2:2015750)
at Object.10546 (/home/pi/plexamp/js/index.js:2:316525) {
code: 'ERR_DLOPEN_FAILED'
}
edit, adding uname info, seems like a 32/64 bit issue
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l GNU/Linux
pi@raspberrypi:~ $ sudo lshw
raspberrypi
description: ARMv7 Processor rev 4 (v7l)
product: Raspberry Pi 3 Model B Plus Rev 1.3
serial: 00000000a1dfd957
width: 32 bits
capabilities: smp
*-core
description: Motherboard
physical id: 0
*-cpu:0
description: CPU
product: cpu
physical id: 0
bus info: cpu@0
size: 1400MHz
capacity: 1400MHz
capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
*-cpu:1
description: CPU
product: cpu
physical id: 1
bus info: cpu@1
size: 1400MHz
capacity: 1400MHz
capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
*-cpu:2
description: CPU
product: cpu
physical id: 2
bus info: cpu@2
size: 1400MHz
capacity: 1400MHz
capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
*-cpu:3
description: CPU
product: cpu
physical id: 3
bus info: cpu@3
size: 1400MHz
capacity: 1400MHz
capabilities: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 cpufreq
*-memory
description: System memory
physical id: 4
size: 924MiB
*-usbhost
product: DWC OTG Controller
vendor: Linux 5.4.83-v7+ dwc_otg_hcd
physical id: 1
bus info: usb@1
logical name: usb1
version: 5.04
capabilities: usb-2.00
configuration: driver=hub slots=1 speed=480Mbit/s
*-usb
description: USB hub
product: USB 2.0 Hub
vendor: Standard Microsystems Corp.
physical id: 1
bus info: usb@1:1
version: b.b3
capabilities: usb-2.00
configuration: driver=hub maxpower=2mA slots=4 speed=480Mbit/s
*-usb
description: USB hub
product: USB 2.0 Hub
vendor: Standard Microsystems Corp.
physical id: 1
bus info: usb@1:1.1
version: b.b3
capabilities: usb-2.00
configuration: driver=hub maxpower=2mA slots=3 speed=480Mbit/s
*-usb
description: Ethernet interface
vendor: Standard Microsystems Corp.
physical id: 1
bus info: usb@1:1.1.1
logical name: eth0
version: 3.00
serial: b8:27:eb:df:d9:57
size: 1Gbit/s
capacity: 1Gbit/s
capabilities: usb-2.10 ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=lan78xx duplex=full ip=192.168.1.13 link=yes maxpower=2mA multicast=yes port=MII speed=1Gbit/s
*-network DISABLED
description: Wireless interface
physical id: 2
logical name: wlan0
serial: b8:27:eb:8a:8c:02
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=brcmfmac driverversion=7.45.229 firmware=01-2dbd9d2e multicast=yes wireless=IEEE 802.11