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

后端 未结 7 490
-上瘾入骨i
-上瘾入骨i 2020-12-07 13:18

I installed the latest version (1.0.0. stable) of composer and in my Yii2 project I typed this:

php composer.phar update

It gives me this error

7条回答
  •  既然无缘
    2020-12-07 13:27

    In my case project on Yii2

    $ composer
    
      [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\ComposerRepo
      sitory::whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypass
      Filters = false)
    

    Yii2, in folder vendor/fxp you need to replace the folder composer-asset-plugin or delete it.

提交回复
热议问题