composer插件升级后报错,[ReflectionException] Class Fxp\Composer\AssetPlugin\Repository\Npm

composerplugin升级后,再使用composer会报错,好比直接在命令行中只输入composer会报错:php

Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar:///usr/local/bin/composer/src/Composer/Package/LinkConstraint/MultiConstraint.php:17composer

Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar:///usr/local/bin/composer/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17ide

直接上报错的图:spa

wKioL1iqpkbS6J3LAAB7q83tyj0927.png

或者再升级一下是这样的:命令行

wKioL1iqo-iiEpiPAAA_9BYDWxE533.png


在网上搜了许多解决办法,但都不成功,直到……blog

重点来了,从上面报错的缘由中能够看到,上面提到了让你将目录切换到C:/Users/***/AppData/Roaming/Composer  ,上面提到了有文件重复了,因此接下来要作的就是将C:/Users/***/AppData/Roaming/Composer/vendor下面的fxp文件件直接删掉。从新打开cmd,再检查一下,看composer就能够用啦。get

wKioL1iqpJWy6X7eAAAhYnbifsE431.png

相关文章
相关标签/搜索