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

Robinvm's avatar

Error: Please provide a valid cache path. Please help

Hey, When i deploy my laravel app it gives this error in the browser on the website InvalidArgumentException in Compiler.php line 36: Please provide a valid cache path. How can i fix this?

0 likes
9 replies
cyril.robillard's avatar

Hello,

I had the same error this week. That was a file permissions problem with the storage folder.

I solved this by doing


chown -R www-data storage

What kind of OS do you use ? Did you check application log and webserver log ?

cyril.robillard's avatar

Someone has the same issue as you.

You should try to manually create missing folder:


storage
storage/app
storage/app/.gitignore
storage/app/public
storage/app/public/.gitignore
storage/framework
storage/framework/.gitignore
storage/framework/cache
storage/framework/cache/.gitignore
storage/framework/sessions
storage/framework/sessions/.gitignore
storage/framework/testing
storage/framework/testing/.gitignore
storage/framework/views
storage/framework/views/.gitignore
storage/logs
storage/logs/.gitignore

5 likes
smdforce's avatar

@cyril.robillard Cool! Your solution worked for me. I tried manually creating missing folders. Thank you very much. Good luck

1 like
RazeAbbas's avatar

you just use another Laravel projects "Storage" folder and replace it to your projects "Storage" folder and Run composer update and there you resolve.

2 likes
cd4success's avatar

@RazeAbbas Thank you so much for posting this regardless. It just saved me from messing up a production site. You're too kind!

Please or to participate in this conversation.