Achronite / mqtt-energenie-ener314rt

MQTT interface for Energenie ENER314-RT add-on board for the Raspberry Pi, designed for use by Home Assistant.
MIT License
13 stars 5 forks source link

Unsupported engine in NPM install? #44

Closed genestealer closed 10 months ago

genestealer commented 10 months ago

image

Could you offer any tips?

Am I downloading an old version? "wget https://github.com/Achronite/mqtt-energenie-ener314rt/archive/refs/heads/master.zip"

When trying to run anyway I get image

genestealer commented 10 months ago

Just a note, I had to uninstall nodejs in order to install npm. This pi previously was running my node red installation. Is the best cause of action to do a clean install?

Achronite commented 10 months ago

You now need nodejs v15+ to run and install mqtt-energenenie-ener314rt. I had to bump the overall nodejs version when the MQTT module library (which I use) needed it. I would just install the latest nodejs version and retry.

genestealer commented 10 months ago

Ok thanks, I will follow https://github.com/nodesource/distributions#debian-versions to install nodejs:

Installation Instructions

Node.js

  1. Download and import the Nodesource GPG key
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
  1. Create deb repository
NODE_MAJOR=20
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
  1. Run Update and Install
sudo apt-get update
sudo apt-get install nodejs -y
genestealer commented 10 months ago

Note, I had to remove the mqtt-energenie-ener314rt folder then run npm install again. As just re-running npm install did not update the MQTT version, even after upgrading to nodejs v15+.

Yay!! Seems to be working! :)

image

genestealer commented 10 months ago

PR raised on documentation to hopefully avoid simulare future issues. https://github.com/Achronite/mqtt-energenie-ener314rt/pull/45