Please help why this error occur

Fatal error : Uncaught ArgumentCountError: Too few arguments to function Slim\App::__construct(), 0 passed in C:\xampp\htdocs\shaban1\public\index.php on line 7 and at least 1 expected in C:\xampp\htdocs\shaban1\vendor\slim\slim\Slim\App.php:61 Stack trace: #0 C:\xampp\htdocs\shaban1\public\index.php(7): Slim\App->__construct() #1 {main} thrown in C:\xampp\htdocs\shaban1\vendor\slim\slim\Slim\App.php on line 61

The error says in your public/index.php file when you create Slim\App you didn’t pass it the required parameter. Can you show your index.php file?

Sounds like you tried to create an app object with ‘new App()’ rather than ‘Slim\Factory\AppFactory::create()’.