Tuesday, March 8, 2022

[FIXED] How can I resolve this problem on Laravel [view.engine.resolver]

Issue

When I run any PHP artisant command I got this Error

C:\xampp\htdocs\project_final-pfe>php artisan route:list             

   Illuminate\Contracts\Container\BindingResolutionException 

  Target class [view.engine.resolver] does not exist.

  at C:\xampp\htdocs\project_final-pfe\vendor\laravel\framework\src\Illuminate\Container\Container.php:879
    875▕ 
    876▕         try {
    877▕             $reflector = new ReflectionClass($concrete);
    878▕         } catch (ReflectionException $e) {
  ➜ 879▕             throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
    880▕         }
    881▕
    882▕         // If the type is not instantiable, the developer is attempting to resolve
    883▕         // an abstract type such as an Interface or Abstract Class and there is

  1   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(Facade\Ignition\IgnitionServiceProvider))

  2   C:\xampp\htdocs\project_final-pfe\vendor\laravel\framework\src\Illuminate\Container\Container.php:877
      ReflectionException::("Class "view.engine.resolver" does not exist")

Solution

  1. Delete the vendor folder.

  2. If you are in development delete the composer.lock file.

  3. Run composer install

  4. Try again your command: php artisan route:list

Update - 15.02.2022

Issue is related to package livewire:livewire and the solution according to the git repo is :

  • Disabling auto-discovery of the livewire/livewire package using the extra.laravel.dont-discover property in composer.json.
  • Registering Livewire\LivewireServiceProvider::class manually in config/app.php.

Source: https://github.com/livewire/livewire/issues/384



Answered By - Yasin BARAN

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.