Is the composer.json
file in place? Typically it would be in example.com/site
on your local/host machine and the Vagrant process syncs it into place on the VM at /srv/www/example.com/current
.
Do you have this directory structure, with a Bedrock-based project at example.com/site
?
example.com/
├── trellis/
├── group_vars/development/wordpress_sites.yml # defines `local_path: ../site`
└── dev.yml # `vagrant provision` runs this
└── site/
└── composer.json # this is in `../site` relative to `dev.yml`
That local_path
variable in group_vars/development/wordpress_sites.yml
tells Vagrant where to find the Bedrock files to sync into the VM. If your local_path
value isn’t correct, or you don’t have a Bedrock project (with composer.json) at the local_path
specified, you’ll encounter the Composer could not find a composer.json file
error.
If you have to adjust the local_path
value, you probably will need to vagrant reload
the sync directories.