当前位置:Gxlcms > PHP教程 > Mac下安装composer后不能安传composerAsset

Mac下安装composer后不能安传composerAsset

时间:2021-07-01 10:21:17 帮助过:2人阅读

先上码如下。

➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.0"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270
➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.4-bata"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

刚开始安装composerAsset 1.0.0版本的时候没问题,后安装1.0.4-bata版本后成功后,我将composer进行了全局安装,但是再执行这个就报上面的错误,搜索了不少资料,但是貌似都没用,删除composer.phar后,重新全局安装,还是没有变化,错误如初,所以只能求指点。

回复内容:

先上码如下。

➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.0"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270
➜  ~  php /usr/local/bin/composer global require "fxp/composer-asset-plugin:~1.1.4-bata"
Changed current directory to /Users/mac/.composer
PHP Fatal error:  Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

Fatal error: Call to undefined method Composer\Package\Version\VersionParser::parseLinks() in /Users/mac/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 270

刚开始安装composerAsset 1.0.0版本的时候没问题,后安装1.0.4-bata版本后成功后,我将composer进行了全局安装,但是再执行这个就报上面的错误,搜索了不少资料,但是貌似都没用,删除composer.phar后,重新全局安装,还是没有变化,错误如初,所以只能求指点。

https://github.com/francoispluchino/composer-asset-plugin/pull/133

  • Linux : rm -rf ~/.composer/vendor/fxp

  • Windows : rm -r%APPDATA%\Composer\vendor\fxp

  • composer global require "fxp/composer-asset-plugin:~1.1.1"

人气教程排行