Команды узла Laravel Spatie SSR не работают всегда Отображение «узла» не распознается как внутренняя или внешняя команда - PullRequest
1 голос
/ 05 июля 2019

Я пытаюсь SSR с помощью Laravel реагировать JS. Пока использую пакет spatie ssr для laravel. все настройки конфигурации выполнены. но всякий раз, когда я пытаюсь запустить его бросая ошибку

    public function mustRun(callable $callback = null, array $env = [])
    {
        if (0 !== $this->run($callback, $env)) {
            throw new ProcessFailedException($this);
        }

        return $this;
    }


"""
The command "node D:\Deepak\react\storage\app/ssr\95698e4a8cd89030841216d9c8ae9b83.js" failed.\n
\n
Exit Code: 1(General error)\n
\n
Working directory: D:\Deepak\react\public\n
\n
Output:\n
================\n
\n
\n
Error Output:\n
================\n
'node' is not recognized as an internal or external command,\r\n
operable program or batch file.\r\n
 (View: D:\Deepak\react\resources\views\welcome.blade.php)

Также я проверил версию узла и путь к системной среде. все хорошо.

Версия узла 8.9.4

        public function mustRun(callable $callback = null, array $env = [])
    {
        if (0 !== $this->run($callback, $env)) {
            throw new ProcessFailedException($this);
        }

        return $this;
    }

    /**
     * Starts the process and returns after writing the input to STDIN.
     *
     * This method blocks until all STDIN data is sent to the process then it
     * returns while the process runs in the background.
     *
     * The termination of the process can be awaited with wait().
     *
     * The callback receives the type of output (out or err) and some bytes from
     * the output in real-time while writing the standard input to the process.
     * It allows to have feedback from the independent process during execution.
     *
     * @param callable|null $callback A PHP callback to run whenever there is some
     *                                output available on STDOUT or STDERR
     * @param array         $env      An array of additional env vars to set when running the process

Аргументы

"""
The command "node D:\Deepak\react\storage\app/ssr\95698e4a8cd89030841216d9c8ae9b83.js" failed.\n
\n
Exit Code: 1(General error)\n
\n
Working directory: D:\Deepak\react\public\n
\n
Output:\n
================\n
\n
\n
Error Output:\n
================\n
'node' is not recognized as an internal or external command,\r\n
operable program or batch file.\r\n
 (View: D:\Deepak\react\resources\views\welcome.blade.php)
...