My composer won't update completely with Laravel 4 it gets stuck with artisan

前端 未结 6 996
无人共我
无人共我 2020-12-31 06:00

Here is the error I am getting:

Script php artisan optimize handling the post-update-cmd event returned with an error

[RuntimeException]  
Error Output:

up         


        
6条回答
  •  清歌不尽
    2020-12-31 06:57

    I had a similar issue when trying to run composer update and none of the solutions above had worked. It turns out I had 2 require sections in my composer.json which is actually wrong.

    "require": {
        "laravel/framework": "4.1.*"
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable",
    "require": {
        "barryvdh/laravel-ide-helper": "1.*",
        "zizaco/confide": "3.2.x",
        "laravelbook/ardent": "dev-master",
        "zizaco/entrust": "dev-master"
    },
    "require-dev": {
        "way/generators": "2.*",
        "fzaninotto/faker": "1.3.*@dev"
    }
    

    Combining the two as below solved my issue.

    "require": {
        "laravel/framework": "4.1.*",
        "barryvdh/laravel-ide-helper": "1.*",
        "zizaco/confide": "3.2.x",
        "laravelbook/ardent": "dev-master",
        "zizaco/entrust": "dev-master"
    },
    

    If you still have a problem, try deleting the composer.lock and the vendor directory and run

    mv ~/.composer/cache ~/.composer/cache.bak
    

    To clear the composer cache and finally run

    sudo composer install
    

    This should solve the issue.

提交回复
热议问题