2019-02-12
laravel의 내장 서버를 실행시키던중에 아래와 같은 오류가 발생했다.
$ php artisan serve --port 8002 [ErrorException] chdir(): No such file or directory (errno 2)


laravel 5.7버전 기준으로, 아래 파일의 chdir()부분을 chdir('/');로 고쳐주면 해결 된다.
vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php
public function fire()
{
	// chdir($this->laravel->publicPath());
	chdir('/'); // 수정

	$this->line("<info>Laravel development server started:</info> <http://{$this->host()}:{$this->port()}>");

	passthru($this->serverCommand());
}