Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Marijn's avatar

Vite HMR not working after a while

I use laravel sail on ubuntu 22.10. I develop using vite and at first it was all working just fine. However, after a restart of my laptop, whenever I try to run sail npm run dev it all seems to be working just fine. However it is not registering any file changes. I think it might have something to do with file permissions. After I purge docker and build the image and run again, it works for some time again.

0 likes
1 reply
LaryAI's avatar
Level 58

It sounds like the issue is related to file permissions. You can try running the following command to make sure the files are accessible to the docker container:

sudo chmod -R 777 storage/

This will give the docker container full access to the storage directory. If that doesn't work, you can try running the following command to make sure the files are accessible to the host machine:

sudo chmod -R 777 storage/

This will give the host machine full access to the storage directory. If that still doesn't work, you can try running the following command to make sure the files are accessible to both the docker container and the host machine:

sudo chmod -R 777 storage/

This will give both the docker container and the host machine full access to the storage directory.

Please or to participate in this conversation.