composerで “Script php artisan optimize handling the post-update-cmd event returned with error code 1” が出たら

laravel 5.4以降で artisan optimizeを使おうとしているのが原因らしい。。。
なのでcomposer.json から

"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize" ←この行を消す
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize" ←この行を消す
]
},

と表示されなくなりました。

コメント

タイトルとURLをコピーしました