which-nodejs: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/which-nodejs - from package: nodejs-which

You may install the required package with command yum install {package}
Error in other languages:
which-nodejs: bevel nie gevind nie
which-nodejs: comandă negăsită
which-nodejs: comando não encontrado
which-nodejs: commande introuvable
which-nodejs: command not found
which-nodejs: käsku ei ole
which-nodejs: không tìm thấy lệnh
which-nodejs: komanda nerasta
which-nodejs: Kommando nicht gefunden.
which-nodejs: kommandot finns inte
which-nodejs: komut yok
which-nodejs: nie znaleziono polecenia
which-nodejs: níor aimsíodh an t-ordú
which-nodejs: no se encontró la orden
which-nodejs: no s'ha trobat l'ordre
which-nodejs: opdracht niet gevonden
which-nodejs: parancs nem található
which-nodejs: perintah tidak ditemukan
which-nodejs: príkaz nenájdený
which-nodejs: příkaz nenalezen
which-nodejs: команда не найдена
which-nodejs: командата не е открита
which-nodejs: 命令找不到
which-nodejs: コマンドが見つかりません