-
-
Save srmklive/f5d43315d4273e94ab69bf3a3a467f20 to your computer and use it in GitHub Desktop.
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 | |
``` |
I ran
composer global update fxp/composer-asset-plugin --no-plugins
but when I run composer update, the above error still persists
Thanks.
I got the same error, when I ran composer global update fxp/composer-asset-plugin --no-plugins the error still persists :(( Very headache
but when I run composer update, the above error still persists
My fxp/composer-asset-plugin was v1.0.3. When I change composer.json to "fxp/composer-asset-plugin": "^1.0"
,
and ran composer global update fxp/composer-asset-plugin --no-plugins
, the error is gone.
Great!!
Thank you, very helpful
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.
Thanks, this was really helpful