首页 > 解决方案 > 在 https://github.com/yiisoft/jquery-pjax.git 的任何分支或标签中都没有找到有效的 bower.json

问题描述

您好,在全局将您的包安装到作曲家后,我在作曲家安装方面遇到了一些问题。请参阅下面的错误

[Composer\Repository\InvalidRepositoryException]
  No valid bower.json was found in any branch or tag of https://github.com/yiisoft/jquery-pjax.git, could not load a package from it

标签: yii2composer-phpbower

解决方案


您需要尝试这些解决方案,通常它会得到修复:

1)如果您有防病毒软件,请将其关闭,因为它可能会阻止一些需要的端口。

composer clear-cache2)在您的项目中运行此命令。

3)如果第一个和第二个解决方案不起作用,则转到/root/.composer目录,创建文件config.json并将这些命令放入其中。

{
    "config": {
        "preferred-install": "dist",
        "github-protocols": ["https","http"],
        "github-oauth": {
            "github.com": "YourGithubOauth"
        }
    }
}

然后再次清除缓存。我希望它的工作。

祝你好运。


推荐阅读