软件包开发&quot“:找不到与您的最低稳定性相匹配的软件包MyComp/Livesearch的版本(稳定)
我正在制作一个Laravel Composer软件包
composer.json
看起来像是这样,
{
"name": "mycomp/livesearch",
"description": "Livewire livesearch package",
"type": "library",
"require": {
"livewire/livewire": "dev-master"
},
"license": "MIT",
"autoload": {
"psr-4": {
"mycomp\\Livesearch\\": "src/"
}
},
"authors": [
{
"name": "parallax",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"prefer-stable": true
}
我通过将其添加到我的root composer.json
时在本地添加了它,
"repositories": [
{
"type": "path",
"url": "packages/mycomp/*"
}
]
但是当我尝试使用Composer安装软件包需要MyComp/Livesearch
我得到的:
找不到匹配您最小稳定性(稳定)的软件包mycomp/livesearch的版本。需要具有明确版本的约束,允许其所需的稳定性。
I'm making a laravel composer package
The composer.json
of the package looks like this
{
"name": "mycomp/livesearch",
"description": "Livewire livesearch package",
"type": "library",
"require": {
"livewire/livewire": "dev-master"
},
"license": "MIT",
"autoload": {
"psr-4": {
"mycomp\\Livesearch\\": "src/"
}
},
"authors": [
{
"name": "parallax",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"prefer-stable": true
}
I've added it locally by adding this to my root composer.json
"repositories": [
{
"type": "path",
"url": "packages/mycomp/*"
}
]
But when I try to install the package using composer require mycomp/livesearch
I get:
Could not find a version of package mycomp/livesearch matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
修复了它。
只需要添加
到我的软件包的
composer.json
中,尽管据我了解,这是一个坏主意,并且最好使用诸如Git之类的VC进行版本控制。但是目前,在我释放包装并将其放在Github上之前,这就足够了。
Fixed it.
Just had to add
To my package's
composer.json
Although, from what I've learnt this is a bad idea, and it's best to do version control with a VCS like Git. But for now, before I release the package and put it on github, this would suffice.