DEV Community

Cover image for Laravel: vendor/bin/sail: No such file or directory
Gustavo Lima
Gustavo Lima

Posted on • Edited on

Laravel: vendor/bin/sail: No such file or directory

I got this error when clone an existing project from my own repository and tried to bring back with sail up:

sail up
sh: vendor/bin/sail: No such file or directory
Enter fullscreen mode Exit fullscreen mode

And after that I realize that obviously I can't do that because I don't have composer dependencies installed.

So, if you don't want to use the local PHP or don't have it, you can use the following command to run a docker container with the right PHP version to install Composer dependencies.

Run it inside you root project folder:

docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v $(pwd):/var/www/html \
    -w /var/www/html \
    laravelsail/php81-composer:latest \
    composer install --ignore-platform-reqs
Enter fullscreen mode Exit fullscreen mode

Done! Now you can use sail up without any problem.

Top comments (0)