Category Archives: node-js

Problems running #node-red as a service (remove nvm)

On some Raspberry Pi’s of mine I had problems running node-js as a service as described here. The only hint of a problem I got was a cryptic “run nvm use latest/*” in the setup. I also remembered a post saying that node-red does not like nvm.

So how to get rid of nvm you have it installed?

First

sudo npm uninstall nvm

to remove it.

Then remove the lines nvm add to your .bashrc file. They are located at the end of the file and look like this

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion

Now remove the nvm config folder

rm -rf ~/.nvm

Now run the node-red setup/update script again and after that services will work again.

Problems with #node-red install script (node-red update step)

I had problems installing node.js using the official install script. The problem

is that the update step fails. There is no clue in the install log file as far as I can see.

To solve the problem I installed node/nmp following the excellent guide here

After you gone throw the steps in the guide just run the install script again and everything will be alright. At least it was for me on a machine running Debian Stretch and some other boxes.