I recently moved from Windows to a Macbook, so I'm not too familiar with the operating system yet. Which is probably what is going wrong here.
When setting up the laptop, I installed Docker and tried to start a Laravel project using Laravel sail.
To get set up, I used the documentation on the Laravel website.
I ran the following command:
curl -s "https://laravel.build/example-app" | bash
And here I run into errors.
The output I get on the terminal is:
latest: Pulling from laravelsail/php83-composer
2c6d21737d83: Pull complete
92f459fbdcda: Pull complete
f47c20ea5e2a: Pull complete
1dc98159c6c0: Pull complete
c58f9b317b86: Pull complete
a90e6b079301: Pull complete
985736889148: Pull complete
5ebc830e3877: Pull complete
d5827b07cd12: Pull complete
655f972d1b33: Pull complete
dff7782a59e2: Pull complete
5ae741e62c20: Pull complete
4f4fb700ef54: Pull complete
59844cc6eb6d: Pull complete
5013e0392271: Pull complete
Digest: sha256:bf8d87c943cacab0e04ead85e8c1db440e345fd1456714f736786ef4d18ba7b7
Status: Downloaded newer image for laravelsail/php83-composer:latest
WARN TTY mode requires /dev/tty to be read/writable.
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v10.3.1)
- Downloading laravel/laravel (v10.3.1)
- Installing laravel/laravel (v10.3.1): Extracting archive
Created project in /opt/example-app
In Factory.php line 310:
Composer could not find a composer.json file in /opt/example-app
To initialize a project, please create a composer.json file. See https://ge
tcomposer.org/basic-usage
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]
bash: line 23: ./vendor/bin/sail: No such file or directory
bash: line 24: ./vendor/bin/sail: No such file or directory
Please provide your password so we can make some final adjustments to your application's permissions.
As you can see in the errors, somehow the necessary files and folders are not created. When I check in Finder I notice that the directory example-app actually gets created, but inside that folder it creates another folder called: laravel-laravel-890835b
And that folder actually contains all the necessary files.
How do I resolve these issues and get the correct directory structure?