composer依賴包https://github.com/DmitryBaranovskiy/eve.git問題解析

場景

當使用composer requeir mdmsoft/yii2-admin ~2.0composer requeir "dmstr/yii2-adminlte-asset" "2.*"等依賴https://github.com/DmitryBaranovskiy/eve.git資源的應用組件時時返回 [Composer\Repository\InvalidRepositoryException]    No valid bower.json was found in any branch or tag of https://github.com/DmitryBaranovskiy/eve.git, could not load a package from it.的錯誤.git

緣由

由於https://github.com/DmitryBaranovskiy/eve返回404頁面未找到...因此,在Bower Regsitry註冊的前依賴包無效。github

解決方案

A方案

更新composer.json文件:web

"config": {
   	"fxp-asset": {
 		"repositories": {
 			"bower-asset/eve": {
 				"type": "bower-vcs",
 				"url": "https://github.com/adobe-webplatform/eve.git"
 			}
 		}
 	}
 },
複製代碼

B方案

以上composer包針對這個錯誤在新版本進行了修復:json

  • "dmstr/yii2-adminlte-asset" : ">2"
  • "mdmsoft/yii2-admin" : "dev-master#1c0887eff2fe5eac924c413219d20e761d5e1d9a"

參考連接

  • [https://github.com/dmstr/yii2-adminlte-asset/issues/123]
  • [https://github.com/mdmsoft/yii2-admin/issues/353]
  • [https://github.com/dmstr/yii2-adminlte-asset/issues/133#issuecomment-337179853]
相關文章
相關標籤/搜索