Php 无法运行';作曲家更新';关于Yii2项目:yiisoft/Yii2 2.0.7需要bower asset/jquery 2.2.*@stable
我删除了我的Php 无法运行';作曲家更新';关于Yii2项目:yiisoft/Yii2 2.0.7需要bower asset/jquery 2.2.*@stable,php,yii2,composer-php,Php,Yii2,Composer Php,我删除了我的vendor/目录并运行了composer update,但它给了我一个错误 $ composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem
vendor/
目录并运行了composer update
,但它给了我一个错误
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package bower-asset/jquery could not be found in any version, there may be a typo in the package name.
Problem 2
- yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.5 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.4 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.3 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.2 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.1 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- yiisoft/yii2 2.0.0 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
- Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
这个方案似乎存在
$ composer search bower | grep jquery
bower-asset/jquery
我删除了“bower asset/jquery”:“*”
行并运行了composer global require fxp/composer asset插件--没有插件
,然后composer更新工作了
。这位作曲家似乎很差劲。我希望它能像Ruby的gem
一样工作。您应该先运行
composer global require "fxp/composer-asset-plugin:1.*"
此命令安装composer资产插件,该插件允许通过composer管理bower和npm包依赖关系
作为Yii的贡献者之一
我们将在2.1中解决这个问题
如果您不想使用插件安装Bower for Yi2,您可以试试 该软件包为Yii2提供了固定的Bower,将Bower和Composer分开 然而,Yii将在2.1版本中使用AssetPackagist而不是Plugin,但不是现在
Composer并不差劲,但插件的创建者可以让你做Composer一开始就不适合做的事情。请责怪
fxp/composer资产插件
。
composer global require "fxp/composer-asset-plugin:1.*"