【发布时间】:2021-04-01 21:32:58
【问题描述】:
我无法在 laravel 项目中添加新包。我正在使用 laravel 7.2 我试图运行这个命令
composer require stripe/stripe-php
但我得到以下错误。
Problem 1
- Root composer.json requires kreait/laravel-firebase ^3.0,
found kreait/laravel-firebase[3.0.0]
but the package is fixed to 2.2.0 (lock file version)
by a partial update and that version does not match.
Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades,
downgrades and removals for packages currently locked to specific versions.
我也尝试了 composer update 但仍然收到此错误。
【问题讨论】:
-
尝试先运行
composer update,然后安装包。 -
我已经写过“我也尝试过 composer update 但仍然收到此错误。”
-
请分享更多细节,比如你的
composer.json的当前状态 -
我已接受解决问题的答案
标签: php laravel composer-php