最近进行了一次composer的update操作。
然后在我自己的项目里面运行了。 composer install的操作,结果出现了很多的错误以前从未见过。Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not existThe "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this WIL L break in the future and it should be fixed ASAP (require ^1.0 for example).[ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist[ErrorException]Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::w hatProvides() should be compatible with Composer\Repository\ComposerRepository:: whatProvides(Composer\DependencyResolver\Pool $pool, $name, $bypassFilters = fal se)解决方案就是:更新你的 fxp/composer-asset-plugin:php composer.phar global update fxp/composer-asset-plugin --no-plugins如果还是不行的话,可以试试下面这个composer global require fxp/composer-asset-plugin --no-plugins