0

Using Laravel Framework 5.5.0. The /var/app/current/storage/framework/views folder is constantly getting deleted.

Has anyone experienced this behavior or know why this would be happening?

*Also worth noting I attempted to circumvent this by setting the immutable flag on the directory but then my frontend stoped working.

user857276
  • 1,407
  • 1
  • 14
  • 19

1 Answers1

1

Looks like the folder is getting deleted because there is no files tracked by git inside.
Try to add .gitignore to the storage/framework/views with the following content:

*
!.gitignore

Then remove all gitigore rules for views folder in root .gitignore. You should be able to add this file to git index and commit. The problem should be fixed after next deploy.

See: How can I add an empty directory to a Git repository?

Andriy Lozynskiy
  • 2,444
  • 2
  • 17
  • 35
  • Thanks Andriy! - I implemented your solution and am waiting to see if the folder gets removed while the application is running. – user857276 Aug 17 '19 at 03:18