I'm trying to duplicate a Laravel 5 project and got this error while running composer update:
Script php artisan clear-compiled handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Illuminate\Routing\ControllerServiceProvider' not found in /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
PHP Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.' in /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Container/Container.php:752
Stack trace:
#0 /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container->build('Illuminate\\Cont...', Array)
#1 /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(687): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
#2 /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(154): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#3 /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(79): Illuminate\Foundation\Bootstrap\HandleExceptions->getExceptionHandler()
#4 /www/sites/myproject/wwwroot/vendor/laravel/framework/ in /www/sites/myproject/wwwroot/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 752
I'm on a local web stack on which I already created a new Laravel project with succes.
To get this error:
- I dowloaded all folders from the production project to my local project folder.
- I deleted the vendors folder and the composer.lock file
- I edit the .env file to reflect the local environnement and turn debuging mode on; looking like this: APP_ENV=local, APP_DEBUG=true, APP_KEY=SomeRandomString, DB_USERNAME=homestead, DB_PASSWORD=homestead,
- I run composer self-update
- I run composer install
- Then composer update, and got the error.
I'm brand new to Laravel, coming from Zend Framework world, so I would like some advice on where I should dig this please.
Others points:
- I get a blank page in browser since the beginning
- I can display successfully a test index.php file in the public folder from the browser.
- The display error is on in the php.ini file and it's the good php.ini file :)
Hope some help, thanks in advance :)
EDIT: May it help, here the content of the composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "~5.0",
"mnshankar/CSV": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"autoload": {
"classmap": [
"database",
"tests/TestCase.php"
],
"psr-4": {
"App\\": "app/"
}
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan route:scan",
"php artisan event:scan",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}