作曲家安装yii2-gii失败

时间:2018-07-20 06:43:12

标签: php yii yii2 composer-php yii2-advanced-app

我是yii2上的一条新鱼。我得到了yii2的{​​{1}}代码,

,然后发现没有composer

,然后我在yii2-gii部分的"yiisoft/yii2-gii": "~2.0.0"中添加了{  require-dev

然后composer.json发生错误。

通知:

  • 我的操作系统是Windows 10。

  • 我已经在环境中全局安装了composer update

  • 我尝试了yii2-requires-bower-asset-jquery,显示了相同的错误信息。

  • 我还尝试在环境中全局安装fxp/composer-asset-plugin:~1.1.3而不是fxp/composer-asset-plugin:^1.4.1,显示了相同的错误信息。

错误信息:

~1.1.3

我的问题

  • 如何发生此错误?

  • 我该怎么办才能解决此问题?

APPEND

Your requirements could not be resolved to an installable set of packages. Problem 1 - yiisoft/yii2 2.0.9 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found. - 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.15.1 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.15 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.14.2 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.14.1 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.14 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.13.3 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.13.2 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.13.1 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.13 requires bower-asset/jquery 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.12.2 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.12.1 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.12 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.11.2 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.11.1 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.11 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - yiisoft/yii2 2.0.10 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable -> no matching package found. - Installation request for yiisoft/yii2 ~2.0.6 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.14, 2.0.14.1, 2.0.14.2, 2.0.15, 2.0.15.1, 2.0.6, 2.0.7, 2.0.8, 2.0.9]. 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. - It's a private package and you forgot to add a custom repository to find it

composer.json

1 个答案:

答案 0 :(得分:1)

您已明确禁用fxp/composer-asset-plugin

"fxp-asset": {
    "enabled": false
}

您应该将其更改为true或改用asset packagist