php artisan serve ErrorException : chdir(): No such file or directory (errno 2)

Posted 1 month ago by behnampmdg3

Hi;

Why do i get this?

The solutions I find suggest to update Kernel and server file.

Does not seem right.

php artisan serve

   ErrorException  : chdir(): No such file or directory (errno 2)

  at /Users/***/codes/goldmembers/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php:42
    38|      * @throws \Exception
    39|      */
    40|     public function handle()
    41|     {
  > 42|         chdir(public_path());
    43| 
    44|         $this->line("Laravel development server started: <http://{$this->host()}:{$this->port()}>");
    45| 
    46|         passthru($this->serverCommand(), $status);

  Exception trace:

  1   chdir("/Users/***/codes/goldmembers/public_html")
      /Users/***/codes/goldmembers/vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php:42

  2   Illuminate\Foundation\Console\ServeCommand::handle()
      /Users/***/codes/goldmembers/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.