Created
April 7, 2016 07:22
-
-
Save srmklive/f5d43315d4273e94ab69bf3a3a467f20 to your computer and use it in GitHub Desktop.
Composer update error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
``` |
Working for me, thanks so much!
Thank you, It's working for me. But Somebody should do it on the composer folder, it not work folder(Even if you set global environment variables on the Windows ).
translate to Chinese:谢谢,这对我来说很有用。但是得注意的是:必须在composer 目录,而不是工作目录(即使你在Windows设置了全局变量)
composer global require fxp/composer-asset-plugin --no-plugins // 第一步 安装
composer global update fxp/composer-asset-plugin --no-plugins // 第二步 升级插件
Thank you, very helpful
Helped me! Thank you!
I have done all of these, but still I had the same problem. I removed vendor/fxp and it fixed.
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
Great!!
Thank you, very helpful