脚本php artisan clear-compiled处理返回的post-update-cmd事件错误(Duplicating Laravel 5项目)

时间:2016-03-16 20:44:53

标签: laravel-5 composer-php artisan

我尝试复制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项目。

要收到此错误:

  1. 我将所有文件夹从生产项目下载到我的本地项目文件夹。
  2. 我删除了vendor文件夹和composer.lock文件
  3. 我编辑.env文件以反映当地环境并开启debuging模式;看起来像这样: APP_ENV =本地, APP_DEBUG = TRUE, APP_KEY = SomeRandomString, DB_USERNAME =宅基地, DB_PASSWORD =家园,
  4. 我运行作曲家自我更新
  5. 我运行composer install
  6. 然后作曲家更新,并收到错误。
  7. 我是来自Zend Framework世界的Laravel的新手,所以我想就我应该在哪里挖掘这些建议。

    其他人指出:

    1. 我从一开始就在浏览器中看到一个空白页
    2. 我可以从浏览器中成功显示公共文件夹中的测试index.php文件。
    3. 显示错误在php.ini文件中打开,它是一个很好的php.ini文件:)
    4. 希望得到一些帮助,提前谢谢:)

      编辑: 请帮忙,这里是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"
       }
      

0 个答案:

没有答案