gpt4 book ai didi

php - Composer 更新无法更新 Laravel 依赖项

转载 作者:可可西里 更新时间:2023-11-01 00:14:13 25 4
gpt4 key购买 nike

当我尝试运行 composer update 时,出现以下错误:

[RuntimeException]
Error Output: '$_' is not recognized as an internal or external command,
operable program or batch file.

我不确定为什么会发生这种情况,但我已经尝试更新 Composer 本身(成功运行)但它不起作用。 Composer 通常工作得很好,所以我有点困惑。

添加了 Composer 文件:

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"bogardo/mailgun": "dev-master"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"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": "stable"
}

最佳答案

看来我的问题已经解决了。我需要保留脚本,因为它支持我的部署。我需要运行 composer update --no-scripts 并且运行良好。

关于php - Composer 更新无法更新 Laravel 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22433919/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com