php composer.phar require加入插件报错,解决方法

php composer.phar require --prefer-dist yiisoft/yii2-redis 加入插件出现以下错误 

[ReflectionException]                                                   
  Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist 

 [ErrorException]                                                                                                                                                                                         
  Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::whatProvides() should be compatible with Composer\Repository\ComposerRepository::whatProvides(Composer\DependencyResolver\  
  Pool $pool, $name, $bypassFilters = false) 

报错解决 

linux:/root/.composer/vendor 删除下面fxp文件夹

window:http://www.bubuko.com/infodetail-1953091.html

你可能感兴趣的:(yii2)