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

etelford's avatar

running `composer update` or `php artisan` return error

When I run composer update or php artisan I get this error:

{"error":{"type":"ErrorException","message":"mkdir(): No such file or directory","file":"\/var\/www\/html_new\/vendor\/laravel\/framework\/src\/Illuminate\/Filesystem\/Filesystem.php","line":297}}

If I echo out $path in this function within Filesystem.php it returns NULL.

I've tried:

  • Deleting vendor and rerunning composer update
  • Checking permissions of app/storage
  • Running composer clear-cache
  • Running composer diagnose to make sure my composer.json file is legit

Any ideas of why this might be happening and how I can fix it?

0 likes
4 replies
etelford's avatar

I should have mentioned that this is Laravel 4.2.

RayRutjes's avatar

Tried composer dump-autoload ? Can you provide your composer.json file ?

etelford's avatar
etelford
OP
Best Answer
Level 5

This occurred because I had a command that was referencing a global variable that didn't exist.

Please or to participate in this conversation.