<?php

namespace Nacmartin\PhpExecJs;

use Nacmartin\PhpExecJs\Runtime\ExternalRuntime;
use Nacmartin\PhpExecJs\Runtime\V8jsRuntime;

class RuntimeAutodetector
{
    private $runtimes = array();

    public function __construct()
    {
        // Runners will be checked for availabilty by order in array so order
        // matters
        $this->runtimes[] = new V8jsRuntime('V8js PHP Extension (V8)');
        $this->runtimes[] = new ExternalRuntime('Node.js (V8)', 'node');
    }

    public function autodetect()
    {
        foreach ($this->runtimes as $runtime) {
            if ($runtime->isAvailable()) {
                return $runtime;
            }
        }
        throw new \RuntimeException('PhpExecJs: Cannot autodetect any JavaScript runtime');
    }
}

<?php

namespace Nacmartin\PhpExecJs;

use Nacmartin\PhpExecJs\Runtime\ExternalRuntime;
use Nacmartin\PhpExecJs\Runtime\V8jsRuntime;

class RuntimeAutodetector
{
    private $runtimes = array();

    public function __construct()
    {
        // Runners will be checked for availabilty by order in array so order
        // matters
        $this->runtimes[] = new V8jsRuntime('V8js PHP Extension (V8)');
        $this->runtimes[] = new ExternalRuntime('Node.js (V8)', 'node');
        $this->runtimes[] = new ExternalRuntime('Node.js (V8)', 'nodejs');
    }

    public function autodetect()
    {
        foreach ($this->runtimes as $runtime) {
            if ($runtime->isAvailable()) {
                return $runtime;
            }
        }
        throw new \RuntimeException('PhpExecJs: Cannot autodetect any JavaScript runtime');
    }
}

Add nodejs as a new runtime name
Add nodejs as a new runtime name

On Debian, node js executable is called nodejs, so I suggest adding nodejs as a new runtime name.