Skip to content

Instantly share code, notes, and snippets.

@srmklive
Created April 7, 2016 07:22
Show Gist options
  • Save srmklive/f5d43315d4273e94ab69bf3a3a467f20 to your computer and use it in GitHub Desktop.
Save srmklive/f5d43315d4273e94ab69bf3a3a467f20 to your computer and use it in GitHub Desktop.
Composer update error
When running any composer commands, sometimes you see the following error stack:
```
[ReflectionException]
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
[ErrorException]
Declaration of Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::whatProvides() shou
ld be compatible with Composer\Repository\ComposerRepository::whatProvides(Composer\DependencyRe
solver\Pool $pool, $name, $bypassFilters = false)
```
To correct this, you need to install/update **fxp/composer-asset-plugin** plugin. You can do that by running the following commands:
```
composer global require fxp/composer-asset-plugin --no-plugins // For installing it first time
composer global update fxp/composer-asset-plugin --no-plugins // For updating plugin, if already installed
```
@OleksiiBrylin
Copy link

Thank you, very helpful

@l174rd
Copy link

l174rd commented Sep 5, 2016

Helped me! Thank you!

@mohammad1381
Copy link

mohammad1381 commented Nov 5, 2016

I have done all of these, but still I had the same problem. I removed vendor/fxp and it fixed.

@IvoPereira
Copy link

I have been trying all kind of solutions and the only way I was able to fix it was following the steps mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment