欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

Mac下安装composer后不能安传composerAsset

程序员文章站 2022-05-03 21:58:39
...
先上码如下。
➜  ~  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"

相关标签: php ios unix