我尝试从 github (designmodo/Flat-UI) 添加存储库,使用配置并收到错误No valid composer.json was found in any branch or...
, Your requirements could not be resolved to an installable set of packages.
, The requested package designmodo/flat-ui could not be found in any version
我在配置中犯了什么错误:
"repositories": {
"flat-ui": {
"type": "package",
"package": {
"name": "designmodo/Flat-UI",
"version": "1.3.0", // Don't know is it important? Where get this number in repo?
"source": {
"url": "https://github.com/designmodo/Flat-UI",
"type": "git",
"reference": "dev-master" // reference is branch name?
}
}
}
},
"require": {
"twbs/bootstrap-sass": "~3.2",
"designmodo/Flat-UI": "dev-master" // branch again (/minimum-stability?)
},
在某些时候,作曲家下载包但返回错误(我不知道他什么时候做的,我在供应商文件夹中查找,并且 designmodo 文件夹就在那里)。
问题解决了。玩转并改变reference
to master
和任何版本*
in "designmodo/Flat-UI": "*"
部分。之后,composer 通过 git 下载包并更新composer.lock
没有什么问题。应该适用于任何 github 存储库。
工作配置:
{
"repositories": {
"flat-ui": {
"type": "package",
"package": {
"name": "designmodo/Flat-UI",
"version": "1.3.0",
"source": {
"url": "https://github.com/designmodo/Flat-UI",
"type": "git",
"reference": "master"
}
}
}
},
"require": {
"twbs/bootstrap-sass": "~3.2",
"designmodo/Flat-UI": "*"
},
}
https://getcomposer.org/doc/05-repositories.md https://getcomposer.org/doc/05-repositories.md
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)