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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay