Fxp \ Composer \ AssetPlugin \ Repository \ NpmRepository不存在

时间:2016-05-12 17:33:43

标签: yii2 composer-php

我安装了“fxp / composer-asset-plugin”的最新版本(1.0.3),它现在是

“fxp / composer-asset-plugin”:“~1.0.3”

但是当我运行任何命令时它会给我这个错误

  

[ReflectionException]类Fxp \ Composer \ AssetPlugin \ Repository \ NpmRepository不存在

     

[ErrorException]声明Fxp \ Composer \ AssetPlugin \ Repository \ AbstractAssetsRepository :: whatProvides()应该与Composer \ Repository \ ComposerRepository :: whatProvides(Composer \ DependencyResolver \ Pool $ pool,$ name,$ bypassFilters = false)兼容)

我运行此命令(php composer.phar全局更新fxp / composer-asset-plugin)但仍然会发生此错误!

当我运行这个命令(composer global require fxp / composer-asset-plugin --no-plugins)时,它会告诉我

  

无需安装或更新

这是我的composer.json

{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "framework", "advanced", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
    "issues": "https://github.com/yiisoft/yii2/issues?state=open",
    "forum": "http://www.yiiframework.com/forum/",
    "wiki": "http://www.yiiframework.com/wiki/",
    "irc": "irc://irc.freenode.net/yii",
    "source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": ">=2.0.6",
    "yiisoft/yii2-bootstrap": "*",
    "yiisoft/yii2-swiftmailer": "*",
    "wbraganca/yii2-dynamicform": "*",
    "fxp/composer-asset-plugin": "~1.0.3",
    "faravaghi/yii2-jalali-datepicker": "*",
    "farsidesign/yii2-jalali-datepicker": "dev-master",

},
"require-dev": {
    "yiisoft/yii2-codeception": "*",
    "yiisoft/yii2-debug": "*",
    "yiisoft/yii2-gii": "*",
    "yiisoft/yii2-faker": "*"
},
"config": {
    "process-timeout": 1800
},
"extra": {
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
}

}

1 个答案:

答案 0 :(得分:0)

最新的fxp / composer-asset-plugin版本为1.1.4

Remove plugin并安装最新版本。不要忘记更新作曲家到last version