我尝试复制Laravel 5项目并在运行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
我在本地网络堆栈上已经成功创建了一个新的Laravel项目。
要收到此错误:
我是来自Zend Framework世界的Laravel的新手,所以我想就我应该在哪里挖掘这些建议。
其他人指出:
希望得到一些帮助,提前谢谢:)
编辑: 请帮忙,这里是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"
}