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

Muhfatih's avatar

PHP Fatal error: Uncaught Error: Interface 'Psr\Container\ContainerInterface' not found in C:\xampp\htdocs\my-app\vendor\laravel\framework\src\Illuminate\Contracts\Container\Container.php:8

I get an error with a message like this: PHP Fatal error: Uncaught Error: Interface 'Psr\Container\ContainerInterface' not found in C:\xampp\htdocs\my-app\vendor\laravel\framework\src\Illuminate\Contracts\Container\Container.php:8 and also an error message like this: Fatal error: Uncaught Error: Interface 'Psr\Container\ContainerInterface' not found in C:\xampp\htdocs\my-app\vendor\laravel\framework\src\Illuminate\Contracts\Container\Container.php:8.

can anyone help me to solve this problem?, I don't know exactly why I can get this error, yesterday I didn't open the code editor but now I got the error.when running laravel application with php artisan serve command, i get this error

0 likes
2 replies
SilenceBringer's avatar
Level 55

@muhfatih possible your vendor directory was damaged for any reason

try to remove vendor directory and run

composer install

in terminal. It will re-install all required packages

Please or to participate in this conversation.