Composer could not find a composer.json file on 'vagrant up'

This is the last problem in a long series of issues I’ve has recently. I am on OSX Catalina and recently ran into problems when Python was updated. It is now fixed (after installing both python2 and python 3 using Homebrew) and vagrant is running again.

My new problem is that the ‘current’ folder is not filled during ‘vagrant up’. When SSHing into the vagrant server I can only see an empty ‘web’ folder in it. This is happening on a 2 year old Trellis install. I updated Trellis to try to fix this (updated all files apart from the group_vars, hosts and hooks) but still get the same error.

The exact error message is

Composer could not find a composer.json file in /srv/www/website.com/current

I have gone through a couple threads about this issue without any success. It looks like a permission issue but I’m out of ideas on how to fix this.

Edit: After looking further into this, there isn’t even a ‘releases’ folder on the vagrant folder

I solved this same issue with an old site by setting Vagrant back to version 2.2.10.

1 Like

Sounds like it can be an issue with the bindfs plugin, have you tried vagrant plugin repair, vagrant plugin update vagrant-bindfs or uninstall/install vagrant-bindfs?
I am not using trellis atm, but have come across this in the past.

2 Likes

I can’t believe that was the solution. I got sidetracked with other problems and never tried simply reverting to the last version of Vagrant. Thank you so much!

1 Like

Thanks for the advice. I assumed it had to do with binding or permissions but updated plugins did not help. Turned out it was cause by the last version of Vagrant. I did not realize it has been updated.

This topic was automatically closed after 42 days. New replies are no longer allowed.