composer常見錯誤處理方案

1、Warning: This development build of composer is over 30 days old. It is recommend

ed to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-

update" to get the latest version.

解決方法:

composer selfupdate

2、錯誤二:

You are running composer with xdebug enabled. This has a major impact on runtime

performance. See https://getcomposer.org/xdebug

安裝完成composer之后,cmd運行composer出現(xiàn)上述錯誤,需要打開PHP配置文件php.ini,找到zend_extension,講該配置項注釋掉即可解決

3、Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\V

ersionParser::parseLinks() in C:\Documents and Settings\Administrator\Applicatio

n Data\Composer\vendor\fxp\composer-asset-plugin\Repository\VcsPackageFilter.php

on line 272

解決方法:

刪除composer資源插件,重新安裝

如果還有錯誤,嘗試全局更新 composer global update

4、如果是在使用yii框架的時候,會出現(xiàn)一下問題

The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this *WIL L* break in the future and it should be fixed ASAP (require ^1.0 for example). The "fxp/composer-asset-plugin" plugin requires composer-plugin-api 1.0.0, this*WILL* break in the future and it should be fixed ASAP (require ^1.0 for example ).

解決辦法:

Yii2 需要 composer-plugin-api 1.0 以上的版本,運行以下命令:

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容