Skip to content

Call php artisan inertia:start-ssr not working on Windows #490

@ycs77

Description

@ycs77

If call the php artisan inertia:start-ssr command on Windows, then get this error:

   Error 

  Call to undefined function Inertia\Commands\pcntl_async_signals()

  at D:\inertia-test\vendor\inertiajs\inertia-laravel\src\Commands\StartSsr.php:62
     58▕
     59▕         $stop = function () use ($process) {
     60▕             $process->stop();
     61▕         };
  ➜  62▕         pcntl_async_signals(true);
     63▕         pcntl_signal(SIGINT, $stop);
     64▕         pcntl_signal(SIGQUIT, $stop);
     65▕         pcntl_signal(SIGTERM, $stop);
     66▕

  1   D:\inertia-test\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36
      Inertia\Commands\StartSsr::handle()

  2   D:\inertia-test\vendor\laravel\framework\src\Illuminate\Container\Util.php:41
      Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

The bug is from inertia-laravel v0.6.7 and Windows because PCNTL extension is not available on Windows, see https://www.php.net/manual/en/intro.pcntl.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions