通过Composer安装2amigos datepicker时出现问题

时间:2015-02-06 04:37:37

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

我正在尝试在Yii2中安装2amigos date picker,但我收到以下错误:

C:\xampp\htdocs\advanced>php composer.phar require "2amigos/yii2-date-picker-widget" "*"
./composer.json has been updated
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
    - yiisoft/yii2 2.0.2 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.
    - Installation request for yiisoft/yii2 == 2.0.2.0 -> satisfiable by yiisoft/yii2[2.0.2].

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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

我已尝试修改composer.json文件,将minimum-stability更改为dev,但这仍然无效。

1 个答案:

答案 0 :(得分:3)

确保使用以下命令安装composer asset插件:

composer global require "fxp/composer-asset-plugin:1.0.0"

它应该只执行一次。

official guideplugin official documentation中了解详情。

如果在安装过程中遇到其他问题,请使用composer命令将self-update更新为最新版本。