Skip to content

Instantly share code, notes, and snippets.

@877dev
Last active January 29, 2021 14:08
Show Gist options
  • Save 877dev/536e35ef79f30cc297d313185cdd430e to your computer and use it in GitHub Desktop.
Save 877dev/536e35ef79f30cc297d313185cdd430e to your computer and use it in GitHub Desktop.
Node Red Alexa temp fix for "failed to load routines: no body"

Info

I am using IOTstack which works with Docker, you will need to change your node-modules directory as needed.

Preparation

Stop node-red container (I used Portainer CE)
Open linux terminal/Putty

Backup the originals:

cd /home/pi/IOTstack/volumes/nodered/data/node_modules/alexa-remote2
sudo mv alexa-remote.js alexa-remote.js.BAK
sudo mv alexa-wsmqtt.js alexa-wsmqtt.js.BAK
sudo mv package.json package.json.BAK

cd ~
mkdir alexatemp
cd alexatemp
git clone https://github.com/Apollon77/alexa-remote
cd alexa-remote

Copy the new files into the node-red modules folder

sudo cp alexa-remote.js /home/pi/IOTstack/volumes/nodered/data/node_modules/alexa-remote2
sudo cp alexa-wsmqtt.js /home/pi/IOTstack/volumes/nodered/data/node_modules/alexa-remote2
sudo cp package.json /home/pi/IOTstack/volumes/nodered/data/node_modules/alexa-remote2

Delete the downloaded files (optional)

cd ~
sudo rm -r alexatemp
exit

Restart node-red to take effect...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment