skip to Main Content

I am following this tutorial,

I installed Docker and WSL2(Ubuntu 20.04.4 LTS) on my windows system, as shown in image below,
enter image description here

When i am trying to run Laravel project using command,

./vendor/bin/sail up

Why i am getting error no such file or directory found?

3

Answers


  1. Instead of:

    ./vendor/bin/sail up ❌
    

    Use this:

    bash ./vendor/laravel/sail/bin/sail up ✅
    
    Login or Signup to reply.
  2. composer update && npm install worked for me

    Login or Signup to reply.
  3. This worked for me:

    Step 1

    In your terminal, run this to open your .bash_profile file :

    nano ~/.bash_profile
    

    And paste this :

    if [ -r ~/.bashrc ]; then
        source ~/.bashrc
    fi
    

    Exit and save the modification.

    Step 2

    Still in your terminal, run this to open your
    .bashrc file :

    nano ~/.bashrc
    

    And paste this :

    alias sail='bash vendor/bin/sail'
    

    Exit and save the modification.

    Step 3

    You can now open any Laravel project using Sail and write the following command to start it :

    sail up
    

    Or to run it on background:

    sail up -d
    

    I’m using Ubuntu 20.04 on WSL2

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search