1

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:

  1. I dowloaded all folders from the production project to my local project folder.
  2. I deleted the vendors folder and the composer.lock file
  3. 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,
  4. I run composer self-update
  5. I run composer install
  6. 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:

  1. I get a blank page in browser since the beginning
  2. I can display successfully a test index.php file in the public folder from the browser.
  3. 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"
 }
10
  • Did you try running composer dump-autoload?
    – Can Celik
    Mar 17, 2016 at 0:02
  • No I didn't know this command. I do my search after seeing your comments, and I thought, this is it! But, no. Sadly, I'm getting the exact same error. :/
    – FredRoger
    Mar 17, 2016 at 1:37
  • Did you also try clearing the /storage/framework/cache and/or artisan clear-compiled ?
    – Can Celik
    Mar 17, 2016 at 2:54
  • No I didn't. So I just tried "php artisan cache:clear" And got the exact same error: 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
    – FredRoger
    Mar 17, 2016 at 15:26
  • Did you find a solution? It seems like I'm having a pretty similar problem! Mar 28, 2016 at 19:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy