Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JangoCG's avatar

Laravel new command fails with The command "'herd' 'tld' '-v'" failed.

Hey,

I am just getting started with laravel.I've installed php with homebrew, valet, composer and xdebug and they all work. I can even debug Laravel applications. However I cannot generate new projects

laravel new test fails with

In Process.php line 371:
                                                                       
  The command "'herd' 'tld' '-v'" failed.                              
                                                                       
  Working directory: /Users/cengiz                                     
                                                                       
  Error: proc_open(): posix_spawn() failed: No such file or directory 

What could be the reason for that? I am not using herd anymore I tried using herd first but it didnt really worj

0 likes
8 replies
LaryAI's avatar
Level 58

It looks like the issue is related to the herd command, which is no longer available or properly configured on your system. Laravel Valet might still be trying to use herd for some of its operations. Here are the steps you can take to resolve this issue:

  1. Uninstall Herd: If you have previously installed herd, make sure it is completely uninstalled from your system.

  2. Reinstall Laravel Valet: Sometimes, reinstalling Valet can help reset its configuration and dependencies.

  3. Check Valet Configuration: Ensure that Valet is not configured to use herd. You can do this by running the following commands:

    valet uninstall
    valet install
    
  4. Clear Valet Configuration: If the above steps do not work, you might need to clear Valet's configuration files manually. You can do this by removing the .valet directory in your home directory:

    rm -rf ~/.valet
    valet install
    
  5. Check PATH Environment Variable: Ensure that your PATH environment variable is correctly set up to include the paths to PHP, Composer, and other necessary binaries. You can check this by running:

    echo $PATH
    

    Make sure it includes paths like /usr/local/bin and the directory where Composer's global binaries are installed (usually ~/.composer/vendor/bin or ~/.config/composer/vendor/bin).

  6. Create a New Laravel Project Using Composer: As an alternative, you can create a new Laravel project using Composer directly:

    composer create-project --prefer-dist laravel/laravel test
    

By following these steps, you should be able to resolve the issue and create new Laravel projects without encountering the herd command error. If the problem persists, please provide more details about your environment and any additional error messages you encounter.

maxxd's avatar

You can always also run composer create-project laravel/laravel . in your project directory

1 like
JangoCG's avatar

I stopped using valet and installed HERD again. Now the laravel new command works

r7z's avatar

i also have the same issue with ubuntu 24.04 in WSL2

Dieal's avatar

I have the same problem, I'm running Arch Linux and I've installed Laravel globally through composer. I'm not using Herd, and I've never installed it on my machine

poldixd's avatar

I'm getting the same error with another laravel command: php artisan about

   Symfony\Component\Process\Exception\ProcessStartFailedException 

  The command "''\''/opt/homebrew/Cellar/php/8.3.7/bin/php'\''' 'composer.phar' '-V' '--no-ansi'" failed.

Working directory: /Users/nils/Sites/XXXXX

Error: proc_open(): posix_spawn() failed: No such file or directory

  at vendor/symfony/process/Process.php:371
    367▕             restore_error_handler();
    368▕         }
    369▕ 
    370▕         if (!\is_resource($process)) {
  ➜ 371▕             throw new ProcessStartFailedException($this, $lastError);
    372▕         }
    373▕         $this->process = $process;
    374▕         $this->status = self::STATUS_STARTED;
    375▕ 

I've upgraded symfony/process from v7.0.7 to v7.1.0. With this version (v7.1.0) I'm getting the error. After downgrading symfony/process to v7.0.7 the error disappears.

stowdgl's avatar

I have the same issue on ubuntu 22.04 under the WSL2. So no valet or herd installed. any ideas how to solve this?

Please or to participate in this conversation.