I updated the Composer using cmd window and got these errors:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Darryldecode\Cart\CartServiceProvider' not found
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output:
The website is not online yet, and I'm running it using xampp.
Now, when i'm trying to access my web site through localhost, I get this error:
FatalErrorException in ProviderRepository.php line 146:
Class 'Darryldecode\Cart\CartServiceProvider' not found.
In the app.php file I have:
Darryldecode\Cart\CartServiceProvider::class,
in the Application Service Providers, and:
'Cart' => Darryldecode\Cart\Facades\CartFacade::class,
in the aliases.
Any ideas on how to get the website back?
Thanks!
Tty this steps
Temporary remove
Darryldecode\Cart\CartServiceProvider::class,
And
'Cart' => Darryldecode\Cart\Facades\CartFacade::class,
Type command
composer update
And then add this class
Because when you update composer he try to find this path before adding in your project, After updating your composer this class added in your folder
Related
Im trying to start a fresh project and am following this guide:
php version: 8.1.9
Composer version: 1.9.0
I'm able to create a project and have tried a few things like installing, updating, updating -- no script, clearing the dump, but it all turns out to me not being able to run php artisan serve
most errors point to the auto load on the fresh load but whenever i've composer dump-autoload and tried and updated and tried this does not solve anything. I've followed this source and cannot find any answers for my solution
Here are my reproduction steps:
visit the laravel install page.
create basic application using composer create-project laravel/laravel example-app
cd into the app
composer update
composer install
when running php artisan serve
error recieved:
PHP Warning:
require(/someapp/vendor/autoload.php): Failed to open stream: No such file or directory in /someapp/artisan on line 18
after running composer dump-autoload
PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in /Documents/someapp/bootstrap/app.php:14```
I'm trying to setup a fresh install of LaraAdmin
http://laraadmin.com
I've been following these instructions:
http://laraadmin.com/docs/1.0/installation#install
I receive an error when I get to the step of running
php artisan la:install
The Error received is:
[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Dwij\Laraadmin\LAProvider' not found
I tried installing 3 times, twice with a local composer installation and once with a global composer installation - both resulting in the same error.
I've also confirmed that Dwij\Laraadmin\LAProvider::class is included in the providers section of config/app.php
When I change Dwij\Laraadmin\LAProvider::class to Dwij\Laraadmin\LAProviderASDF::class in config/app.php - the error becomes:
[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Dwij\Laraadmin\LAProviderASDF' not found
So it's clear that the added line of code in config/app.php triggers this error.
How can I resolve the class not found error?
You need to import laraAdmin classes first via composer in the terminal:
composer require "dwij/laraadmin:1.0.40"
After that, you'll be fine running php artisan la:install
Paste this line bottom of the providers in config/app.php
Dwij\Laraadmin\LAProvider::class
So I'm new to Laravel and been following the Laracasts series on Laravel.
I cloned an open source Laravel Project, It doesn't have 'Vendor' Directory' , I was told to run 'composer update' in the root of the project to include it.
I do that and I get the error:
[ErrorException]
copy(/home/sanyam/.composer/cache/files/laravel/socialite/fc3ff90cae77020dba2dc23168bebe2313c43051.zip): failed to open stream: Permission denied
I tried to run the website locally and the terminal gave the error:
Class 'Laravel\Socialite\SocialiteServiceProvider' not found in /home/sanyam/projectname-web/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 150
Here is the deal, I can't edit any code in congif/app.php or anywhere because the project is up and running.
The last time it happened, I was missing the curl extension in PHP, installed it and it worked. This time I've tried clearing the cache using composer dump-autoload (doesn't work)
What am I supposed to do ?
Thank you in advance :)
I was developing on my dev machine using Homestead. I committed both my composer.lock and composer.json. During this branch, I added Hashid and LaravelDebugBar to composer for development purposes. Everything worked fine on the development machine.
Once I pulled from master to my production machine, and ran composer update, and I get the following error:
When I type in php artisan migrate or composer update, I get the following error:
PHP Fatal error: Class 'Vinkla\Hashids\HashidsServiceProvider' not found in /var/www/schedulizer/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Vinkla\Hashids\HashidsServiceProvider' not found
I tried composer clear-compiled, composer dump-autoload tried manually requiring the Hashid package, and removing the offending lines in config/app.php and running composer update
I checked the service provider, and it is in my config/app.php..
Instead of running composer update, run composer install on the production machine instead; this will bypass the pre-update hooks that Laravel runs.
Source
If they were dev requirements, then you can conditionally add them to your service providers list by adding them to your AppServiceProvider like such:
// AppServiceProvider.php
public function register()
{
/* ... */
if ($this->app->environment('production')) {
// $this->app->register('');
} else {
$this->app->register('Vinkla\Hashids\HashidsServiceProvider');
}
}
Source
First of all, check if Vinkla\Hashids\HashidsServiceProvider exists. Also, double check all letter (it's always better to copy-paste namespace from documentation). Then try to run this command:
composer dumpauto
If it will not help, run this command:
composer dumpauto -o
I tried php artisan config:clear then I ran composer update and composer install but I got the same error message.
in my case, the problem was in bootstrap/cache/config.php
So I deleted the file manually and mission accomplished.
I've got a brand new laravel installation on DigitalOcean, which I'm attempting to run a basic `composer update' on. However, I'm seeing the following error come up every time I try to update. I can't solve the problem with composer cacheclear, deleting the vendor/compiled.php file, or even reinstalling the entire framework.
I don't understand exactly what the error is in the first place, so I'm a bit lost. Any tips on what's going on?
Script php artisan clear-compiled handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Call to undefined method Illuminate\Foundat
ion\Application::getCachedCompilePath() in /var/www/html/production/vendor/
laravel/framework/src/Illuminate/Foundation/Console/ClearCompiledCommand.ph
p on line 28
Delete the vendor/compiled.php and run composer update.
Source: https://laracasts.com/discuss/channels/general-discussion/runtimeexception-on-fresh-install?page=1