_mocha: 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/lib/node_modules/mocha/bin/_mocha - from package: mocha

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/lib/nodejs/mocha/bin/_mocha - from package: mocha

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