php – Setup a Laravel existing project-ThrowExceptions

Exception or error:

I’m trying to install an existing Laravel project by running a “composer install” command but i’m getting the following errors :

 PHP Fatal error:  Uncaught Error: Class 'Symfony\Thanks\Command\ThanksCommand' not found in /home/lyes/Documents/AppStage/vendor/symfony/thanks/src/Thanks.php:58

Stack trace:

 #0 /usr/share/php/Composer/Plugin/PluginManager.php(236): Symfony\Thanks\Thanks->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
    #1 /usr/share/php/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Symfony\Thanks\Thanks))
    #2 /usr/share/php/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
    #3 /usr/share/php/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loadRepository(Object(Composer\Repository\InstalledFilesystemRepository))
    #4 /usr/share/php/Composer/Factory.php(384): Composer\Plugin\PluginManager->loadInstalledPlugins()
    #5 /usr/share/php/Composer/Factory.php(576): Composer\Factory->createComposer(Object(Composer\IO\ConsoleIO), Array, false)
    #6 /usr/share/php/Composer/Console/Application.php(332): C in /home/lyes/Documents/AppStage/vendor/symfony/thanks/src/Thanks.php on line 58

    Fatal error: Uncaught Error: Class 'Symfony\Thanks\Command\ThanksCommand' not found in /home/lyes/Documents/AppStage/vendor/symfony/thanks/src/Thanks.php:58
    Stack trace:
    #0 /usr/share/php/Composer/Plugin/PluginManager.php(236): Symfony\Thanks\Thanks->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
    #1 /usr/share/php/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(Symfony\Thanks\Thanks))
    #2 /usr/share/php/Composer/Plugin/PluginManager.php(261): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage))
    #3 /usr/share/php/Composer/Plugin/PluginManager.php(76): Composer\Plugin\PluginManager->loadRepository(Object(Composer\Repository\InstalledFilesystemRepository))
    #4 /usr/share/php/Composer/Factory.php(384): Composer\Plugin\PluginManager->loadInstalledPlugins()
    #5 /usr/share/php/Composer/Factory.php(576): Composer\Factory->createComposer(Object(Composer\IO\ConsoleIO), Array, false)
    #6 /usr/share/php/Composer/Console/Application.php(332): C in /home/lyes/Documents/AppStage/vendor/symfony/thanks/src/Thanks.php on line 58

Can anyone help me, I am really overwhelmed

How to solve:

Try using composer update and composer dump-autoload command

Answer:

Just delete vendor folder and than run composer update command

Answer:

When you run composer install it will look for a lock file and install whatever is contained in it. Check if your composer.lock or run composer update command

Answer:

Try the following steps:

  • Remove the vendor folder if already there
  • Delete the composer.lock file
  • Run composer install command in the terminal.

Leave a Reply

Your email address will not be published. Required fields are marked *