Hi, after moving to a new SSD I changed my local dev environment from LAMP to Laravel Homestead. Now when I’m changing status of a page (which involves changing path to that file), I get an error message “Error: file_get_contents(/home/vagrant/example-site/content/test/default.txt): Failed to open stream: No such file or directory”. The status of a page gets changed – the folder is successfully renamed. Have you encountered anything similar or have an idea how to prevent those errors showing up?
Sorry that nobody has answered your question yet. Unfortunately, as a Laravel Valet user, I have no experience whatsoever with Homestead. Maybe it doesn’t sync properly…
@bvdputte As far as I remember, you at least used to use Homestead, any ideas?
@texnixe, you’re right. I haven’t really encountered something like this though?
Have you checked via
vm ssh and see if the file is really changed “inside the vm”?
FYI: I’ve mapped my local folder via
nfs type to the VM.
If errors persist, can you please try to destroy the vm and rebuild it?
I checked via ssh and the files were indeed changed inside the vm. Destroyng and rebuilding the vm didn’t help either. But the solution was your hint about nfs – I changed mapping to nfs and it works! Thank you both!
In case anyone has the same issue, maybe this will save you some googling:
I had to add
type: "nfs" to my project folders config inside Homestead.yaml, install nfs on my machine
apt-get install nfs-kernel-server, inside
etc/nfs.conf uncomment line
# udp=n and change it to
udp=y and reload the vm.
Glad you figured it out @piotrek and thanks for getting back!