You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a small home automation project that has been running fine on MacOS, but after porting it over to Raspberry Pi, I have not been able to resolve an error when trying to run node index.js.
I've spent quite a bit of time trying to triage the issue. I've reinstalled a clean version of Node, trying versions 20, 18, and 16. I've also moved everything inside a Docker container to get a clean install, with no success. Any pointers in the right direction would be appreciated.
sudo docker run --rm -it --net=host --privileged aranet_smarthome
Error Details:
Module did not self-register: '/usr/src/app/node_modules/@abandonware/bluetooth-hci-socket/build/Release/bluetooth_hci_socket.node'.
Stack Trace:
Error: Module did not self-register: '/usr/src/app/node_modules/@abandonware/bluetooth-hci-socket/build/Release/bluetooth_hci_socket.node'.
at Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/usr/src/app/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:2:30)
at Module._compile (node:internal/modules/cjs/loader:1364:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Module._load (node:internal/modules/cjs/loader:1019:12)
Dockerfile
FROM node:18-bullseye
RUN apt-get update && apt-get install -y \
git \
build-essential \
python3 \
bluetooth \
bluez \
libbluetooth-dev \
libudev-dev \
libcap2-bin \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/swissmilo/aranet_smarthome.git /usr/src/app
WORKDIR /usr/src/app
COPY .env ./
COPY package*.json ./
RUN npm install --build-from-source
RUN setcap cap_net_raw,cap_net_admin+eip `readlink -f \`which node\``
CMD ["npm", "start"]`
I have a small home automation project that has been running fine on MacOS, but after porting it over to Raspberry Pi, I have not been able to resolve an error when trying to run node index.js.
I've spent quite a bit of time trying to triage the issue. I've reinstalled a clean version of Node, trying versions 20, 18, and 16. I've also moved everything inside a Docker container to get a clean install, with no success. Any pointers in the right direction would be appreciated.
sudo docker run --rm -it --net=host --privileged aranet_smarthome
Dockerfile
package-lock.json excerpt
The text was updated successfully, but these errors were encountered: