我试图创建一个新的laravel设置。当我运行composer install
时,我收到的错误并没有给我太多信息,而且我真的不知道如何解决它。
这是错误
$ composer install
php artisan
clear-compiled脚本php artisan clear-compiled处理返回错误的pre-update-cmd事件
[RuntimeException的]
错误输出:
这是我的composer.json文件
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
希望你们中的任何人都可以帮助我!
答案 0 :(得分:0)
自composer
最近更改后,您应将php artisan clear-compiled
移至post-update-command
键。
https://laravel-news.com/2016/03/may-need-update-composer-json-file