Cannot install Node-Red on VM

During install the following error is seen.

[  OK  ] DietPi-Software | G_AGI python python3
/DietPi/dietpi/dietpi-software: line 2914:  2426 Illegal instruction     npm i -g --unsafe-perm node-red

Using the VM image.


I was testing the installation of node-red on my VM as well without issues. Are you able to retry?

Nope, same error.

 Mode: Installing Node-Red: tool for wiring devices, APIs and online services

[ INFO ] DietPi-Software | APT installation for: python python3, please wait...
[  OK  ] DietPi-Software | G_AGI python python3
/DietPi/dietpi/dietpi-software: line 2914: 17865 Illegal instruction     npm i -g --unsafe-perm node-red
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[  OK  ] DietPi-Services | stop : netdata
[  OK  ] DietPi-Services | stop : mosquitto
[  OK  ] DietPi-Services | stop : avahi-daemon

I have tried uninstalling and reinstalling.

can you maybe create an empty / fresh VM and check how it is there? You could one of the new VM Images.

This is an almost fresh image (just a few packages added) running

DietPi v6.28.0

root@DietPi:~#  cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION="10 (buster)"

What is ‘new’? It is a PITA to convert the VMWare to an ESXI image so unless there is a good reason to, I’d rather not update the base image.

hmm it might be that this is because you are running on ESXI server. Looks like your hardware/cpu architecture is not supported and you get the

Illegal instruction

message. Did you checked the option to install Node-Red on Docker?

In which case DietPi should mark as unavailable?

Thing is, it used to work fine. Only when I updated to Buster images did it complain.

The server is just an AMD Turion Neo N54L.


DietPi is doing nothing else as executing the commands that are listed on Node-Red WebSite.

npm install -g --unsafe-perm node-red

So you could execute it yourselves. But this exactly the point where your installation failed

Illegal instruction     npm i -g --unsafe-perm node-red

Yes that is exactly where it failed. I tried it manually without success. There was some stuff on-line regarding an issue with Proxies (I’m not behind one) and I tried some of the fixes but I have not been able to solve the issue. Very annoying. I like DietPi but it seems that for me (with the HDD/SSD issue as well) it is time to part ways.


I don’t think this is a DietPi problem. But maybe you could try a different Debian Destro on your ESXI server.

I’ve eventually got Node-Red installed by installing nodejs V12 first manually and then Node-Red by the command above

I note from the node-red pages that nodejs V12 is the highest supported version where DietPi installs V13.

I have now tested this further and it is definitely the version of nodejs that is the issue.

I first installed nodejs v12 manually from the debian repos - as per

I then edited dietpi-software so that the nodejs install script does not run but DietPi think it has installed nodejs.

Running dietpi-software install 122, runs as expected and installs Node-Red.


DietPi is not calling a specific version of Node.js. It’s using the default installer, that is provided by Node.js. And this installer is downloading Node.js. So it’s out of DietPi control which version is downloaded.

 Mode: Installing Node.js: javascript runtime

[  OK  ] DietPi-Software | Connection test:
--2020-03-03 16:17:02--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1943 (1.9K) [text/plain]
Saving to: ‘’               100%[==============================================>]   1.90K  --.-KB/s    in 0s

2020-03-03 16:17:03 (14.8 MB/s) - ‘’ saved [1943/1943]

Node Linux Installer by
Running as Root User
Get Latest Version Number...
Downloading latest stable Version node-v13.9.0-linux-x64.tar.gz...
Finished installing!

I tested it again on my VM and it’s still working fine using node-v13

[  OK  ] DietPi-Software | G_AGI python python3
npm WARN deprecated request@2.88.0: request has been deprecated, see
/usr/local/bin/node-red -> /usr/local/lib/node_modules/node-red/red.js
/usr/local/bin/node-red-pi -> /usr/local/lib/node_modules/node-red/bin/node-red-pi

> bcrypt@3.0.6 install /usr/local/lib/node_modules/node-red/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404):
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.6 and node@13.9.0 (node-v79 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/usr/local/lib/node_modules/node-red/node_modules/bcrypt/build'
  CXX(target) Release/
  CXX(target) Release/
  CXX(target) Release/
In file included from ../src/
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
In file included from ../../nan/nan.h:53,
                 from ../src/
../src/ At global scope:
/root/.cache/node-gyp/13.9.0/include/node/node.h:618:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
       (node::addon_register_func) (regfunc),                          \
/root/.cache/node-gyp/13.9.0/include/node/node.h:652:3: note: in expansion of macro ‘NODE_MODULE_X’
   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
../src/ note: in expansion of macro ‘NODE_MODULE’
 NODE_MODULE(bcrypt_lib, init);
  SOLINK_MODULE(target) Release/
  COPY Release/bcrypt_lib.node
  COPY /usr/local/lib/node_modules/node-red/node_modules/bcrypt/lib/binding/bcrypt_lib.node
  TOUCH Release/
make: Leaving directory '/usr/local/lib/node_modules/node-red/node_modules/bcrypt/build'
+ node-red@1.0.4
added 334 packages from 340 contributors in 81.657s

The node-red docs state V12 is the latest supported version of nodejs.

The Node-Red Raspbian install script installs v12 (or v8 depending on base OS).

OV=`cat /etc/os-release | grep VERSION_ID | cut -d '"' -f 2`
if [[ "$OV" = "8" ]]; then
    if curl -sL | sudo -E bash - 2>&1 | sudo tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi
    if curl -sL | sudo -E bash - 2>&1 | sudo tee -a /var/log/nodered-install.log >>/dev/null; then CHAR=$TICK; else CHAR=$CROSS; fi

As V13 is not a supported version of nodejs by Node-Red, it should not be used.