Only the default Lumen route is recognized

  docker, laravel, lumen, php

I’m creating routes for my Lumen app and I ran into the following problem.
The default route has the expected return

web.php

$router->get('/', function () use ($router) {
    return $router->app->version();
});

the return value:
Lumen (8.2.4) (Laravel Components ^8.0)

but for any URI other than this we have the following error message

500 Internal Server Error nginx

The laravel logs point to the following error

local.ERROR: Uncaught IlluminateContractsContainerBindingResolutionException: Target [IlluminateContractsHttpKernel] is not instantiable. in /home/wesleytio/laravelProjects/russian-catholica/vendor/illuminate/container/Container.php:1089
Stack trace:
#0 /home/wesleytio/laravelProjects/russian-catholica/vendor/illuminate/container/Container.php(882): IlluminateContainerContainer->notInstantiable()
#1 /home/wesleytio/laravelProjects/russian-catholica/vendor/illuminate/container/Container.php(754): IlluminateContainerContainer->build()
#2 /home/wesleytio/laravelProjects/russian-catholica/vendor/illuminate/container/Container.php(692): IlluminateContainerContainer->resolve()
#3 /home/wesleytio/laravelProjects/russian-catholica/vendor/laravel/lumen-framework/src/Application.php(300): IlluminateContainerContainer->make()
#4 /home/wesleytio/laravelProjects/russian-catholica/vendor/laravel/lumen-framework/src/helpers.php(42): LaravelLumenApplication->make()
#5 Command line code(1): app()
#6 {main}
  thrown {"exception":"[object] (SymfonyComponentErrorHandlerErrorFatalError(code: 0): Uncaught IlluminateContractsContainerBindingResolutionException: Target [IlluminateContractsHttpKernel] is not instantiable. in /home/wesleytio/laravelProjects/russian-catholica/vendor/illuminate/container/Container.php:1089
Stack trace:
#0 .../vendor/illuminate/container/Container.php(882): IlluminateContainerContainer->notInstantiable()
#1 .../vendor/illuminate/container/Container.php(754): IlluminateContainerContainer->build()
#2 .../vendor/illuminate/container/Container.php(692): IlluminateContainerContainer->resolve()
#3 .../vendor/laravel/lumen-framework/src/Application.php(300): IlluminateContainerContainer->make()
#4 .../vendor/laravel/lumen-framework/src/helpers.php(42): LaravelLumenApplication->make()
#5 Command line code(1): app()
#6 {main}
  thrown at /.../vendor/illuminate/container/Container.php:1089)
[stacktrace]
#0 {main}
"}

Does anyone have any idea what can be done?

Source: Laravel

Leave a Reply