2015-02-06 110 views
1

安装2amigos日期选择器,当我试图在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-stabilitydev,但这仍然不起作用。

+3

您是否安装了Composer资产插件? 'composer global require“fxp/composer-asset-plugin:1.0.0”'http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-via-composer – arogachev 2015-02-06 04:43:05

+0

只是做了这个和我得到后续.. '更新的依赖关系(包括需要-DEV) - 安装FXP /作曲家-资产插件(V1.0.0) 下载:100% 致命错误:类' 作曲\安装\ InstallerEvents '找不到C:\ Users \ Nerison \ AppData \ Roaming \ Composer \ vendor \ fxp \ composer-asset-plugin \ FxpAssetPlugin.php在线75 ' – beginner 2015-02-06 04:49:52

+3

现在安装它没有任何问题。尝试使用'self-update'命令将'composer'更新到最新版本。 – arogachev 2015-02-06 04:55:41

回答

3

务必安装作曲家资产插件使用下面的命令:

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

应该只执行一次。

了解更多official guideplugin official documentation

如果安装过程中出现其他问题更新composerself-update命令的最新版本。