【问题标题】:composer does not download twitter/bootstrap作曲家不下载 twitter/bootstrap
【发布时间】:2013-07-29 19:02:49
【问题描述】:

我在 composer 从 packagist 下载 twitter/bootstrap 包 v2.2.2 时遇到问题。

错误信息是在尝试下载包之后:

[Composer\Downloader\TransportException] “https://api.github.com/repos/twitter/bootstrap/zipball/v2.2.2”文件 无法下载(HTTP/1.1 404 Not Found)

这有点奇怪,因为版本确实存在。我在 Windows 上使用作曲家,我还没有遇到过这样的问题。

【问题讨论】:

  • 运行 composer diag 并查看它的输出。也许 Github 暂时宕机了。
  • status.github.com/messages "我们已经缓解了 DDoS 攻击,网站应该可以正常响应。我们仍在调查访问 GitHub API 时异常小幅增加的原因。"
  • 真的很感谢,或许以后一切都恢复正常了:)
  • 问题依旧

标签: php twitter-bootstrap composer-php


【解决方案1】:

随着 Bootstrap 3 的发布,他们稍微更改了 URL。

路径从 twitter/bootstrap 更改为 twbs/bootstrap

截至目前,当我写这篇文章时,新路径正在拉 2.3.2,但我怀疑它很快就会开始拉 3.x。

更多信息在这里:http://blog.getbootstrap.com/2013/07/27/bootstrap-3-rc1/

【讨论】:

  • 打破很多人依赖的方法!另请注意; twitter/bootstrap-custompath 不再是。
【解决方案2】:

我让它在我的 composer.lock 文件中使用以下 JSON:

 {
        "name": "twbs/bootstrap",
        "version": "v2.2.2",
        "target-dir": "twbs/bootstrap",
        "source": {
            "type": "git",
            "url": "git://github.com/twbs/bootstrap.git",
            "reference": "v2.2.2"
        },
        "dist": {
            "type": "zip",
            "url": "https://github.com/twbs/bootstrap/archive/v2.3.2.zip",
            "reference": "v2.2.2",
            "shasum": ""
        },
        "type": "library",
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "Apache-2.0"
        ],
        "description": "Sleek, intuitive, and powerful front-end framework for faster and easier web development.",
        "homepage": "http://twitter.github.com/bootstrap/",
        "keywords": [
            "bootstrap",
            "css"
        ],
        "time": "2012-12-08 20:57:21"
    }

将所有“twitter”替换为 twbs。我怀疑您也可以将版本更改为 2.3.2。

【讨论】:

    猜你喜欢
    • 2016-06-07
    • 1970-01-01
    • 2014-06-16
    • 2014-11-23
    • 1970-01-01
    • 2015-12-06
    • 2013-03-05
    • 1970-01-01
    相关资源
    最近更新 更多