Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法运行';作曲家更新';关于Yii2项目:yiisoft/Yii2 2.0.7需要bower asset/jquery 2.2.*@stable_Php_Yii2_Composer Php - Fatal编程技术网

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.*"