Vagrant only syncs folders, no files

Hi all! I’m trying to get my local Trellis to work. When i run vagrant up I get the following error:

Composer could not find a composer.json file in
/srv/www/hogtrycksteknik.se/current To initialize a project, please create a
composer.json file as described in the https://getcomposer.org/ "Getting
Started" section
failed: [default] (item=hogtrycksteknik.se) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "hogtrycksteknik.se", "value": {"admin_email": "hogtrycksteknik2.0@gmail.com", "cache": {"enabled": false}, "local_path": "../site", "multisite": {"enabled": false}, "site_hosts": [{"canonical": "hogtrycksteknik.test"}], "ssl": {"enabled": false}}}, "stdout": "Composer could not find a composer.json file in /srv/www/hogtrycksteknik.se/current\nTo initialize a project, please create a composer.json file as described in the https://getcomposer.org/ \"Getting Started\" section\n", "stdout_lines": ["Composer could not find a composer.json file in /srv/www/hogtrycksteknik.se/current", "To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ \"Getting Started\" section"]}

When I SSH into the vagrant box I can see that

/srv/www/hogtrycksteknik.se

has been created but it only contains folders (current, logs, shared). If I then look into the current folder it only contains an empty web folder. On my local machine there is a newly installed Bedrock site that should have been synced to the Vagrant box. So, how come only some folders has been synced and no files?

I recently faced this issue with no explanation. I assume it was due to some background updates on some software. My hammer approach solution was to do a vagrant destroy and vagrant up then all files sync’d as normal

The only thing which changed in my environment was to add a new site host to my development group vars.

Tried that several times I’m afraid… :frowning:

Hi Simpel

I experienced the same issue. I have managed to solve by creating a new directory outside of /Users/me/Documents at /Users/me/Development and run from there. This seem to solved my issue.

Liam

I also noticed that this only appears to be an issue when the synced folder and project is in a directory which contains a space or special character

For example ‘my project folder’ was more likely to have the issue over ‘my-project-folder’

Strange how this issue has only recently become a thing though with no obvious updates to my local machine or relevant software

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