2015-02-06 125 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命令的最新版本。