简体   繁体   English

作曲家更新/安装中的问题

[英]Issue in composer update/install

I try to install the composer but it not works and give the below mentioned issue after following different different steps.我尝试安装作曲家,但它不起作用,并在遵循不同的不同步骤后给出了下面提到的问题。 Please help if you know how can I resolve it如果您知道我该如何解决,请帮助

[Composer\\Repository\\InvalidRepositoryException] [Composer\\Repository\\InvalidRepositoryException]
No valid bower.json was found in any branch or tag of https://github.com/jquery/jquery-dist.git , could not load a package from it.https://github.com/jquery/jquery-dist.git 的任何分支或标签中找不到有效的 bower.json,无法从中加载包。

composer global require "fxp/composer-asset-plugin:~1.4"
composer install

give the key, after some time it says permission issue unable to create vendor folder, give the permission to the folder and run给密钥,一段时间后它说权限问题无法创建供应商文件夹,给文件夹权限并运行

composer update

it gives the above mentioned error, then i run它给出了上述错误,然后我运行

composer clear-cache
composer install

give the key, but not it gives above mentioned issue.给钥匙,但不是它给出了上述问题。

Below mentioned is my composer file.下面提到的是我的作曲家文件。

{
    "name": "yiisoft/yii2-app-basic",
    "description": "Yii 2 Basic Project Template",
    "keywords": ["yii2", "framework", "basic", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "~2.0.5",
        "yiisoft/yii2-bootstrap": "~2.0.0",
        "yiisoft/yii2-swiftmailer": "~2.0.0",
        "twilio/sdk": "^5.11",
        "endroid/qrcode": "^2.3",
        "2amigos/yii2-flysystem-component": "^1.0",
        "cedricziel/flysystem-gcs": "^1.1",
        "league/flysystem-cached-adapter": "^1.0",
        "mpdf/mpdf":"*"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "~2.0.0",
        "yiisoft/yii2-gii": "~2.0.0",
        "yiisoft/yii2-faker": "~2.0.0",

        "codeception/base": "^2.2.3",
        "codeception/verify": "~0.3.1",
        "codeception/specify": "~0.4.3",
        "kartik-v/yii2-widget-fileinput": "*",
        "kartik-v/yii2-widget-datepicker": "*",
        "kartik-v/yii2-grid": "*",
        "kartik-v/yii2-widget-select2": "*",
        "kartik-v/yii2-detail-view": "*",
        "kartik-v/yii2-widgets": "*",
        "kartik-v/yii2-money": "*",
        "kartik-v/yii2-slider": "*",
        "kartik-v/yii2-checkbox-x": "*",
        "kartik-v/bootstrap-popover-x": "*",
        "kartik-v/yii2-popover-x": "*",
        "kartik-v/yii2-editable": "*",
        "kartik-v/dependent-dropdown": "*",
        "kartik-v/yii2-field-range": "*",
        "kartik-v/bootstrap-checkbox-x": "*",
        "kartik-v/bootstrap-fileinput": "*",
        "kartik-v/yii2-widget-datetimepicker": "*",
        "kartik-v/yii2-markdown": "*",
        "2amigos/yii2-tinymce-widget": "*",
        "2amigos/yii2-file-input-widget" : "*",
        "razorpay/razorpay": "1.*",
        "kop/yii2-conditional-validator": "dev-master",
        "nodge/yii2-eauth": "~2.0",
        "guzzlehttp/guzzle": "^6.1"
    },
    "config": {
        "process-timeout": 1800
    },
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\Installer::postCreateProject"
        ]
    },
    "extra": {
        "yii\\composer\\Installer::postCreateProject": {
            "setPermission": [
                {
                    "runtime": "0777",
                    "web/assets": "0777",
                    "yii": "0755"
                }
            ],
            "generateCookieValidationKey": [
                "config/web.php"
            ]
        },
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}

I need to see your composer.json , however as i can see you already tried我需要查看您的composer.json ,但是我可以看到您已经尝试过

composer clear-cache in your project. composer clear-cache在您的项目中。

so try this :所以试试这个:

go to /root/.composer directory, and create file config.json and put these command inside it.转到/root/.composer目录,并创建文件config.json并将这些命令放入其中。

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

then clear cache again.然后再次清除缓存。 and I wish its work.我希望它的工作。

Add the following code to your composer.json file将以下代码添加到您的 composer.json 文件中

"repositories": [
    {
       "type": "composer",
       "url": "https://asset-packagist.org"
    }
]

If Still doesnt work.如果还是不行。 Try removing fxp/composer-asset-plugin :尝试删除 fxp/composer-asset-plugin :

composer remove fxp/composer-asset-plugin
or
composer global remove fxp/composer-asset-plugin

我通过将 composer-asset-plugin 更新到最新版本来解决它:

composer global require "fxp/composer-asset-plugin:~1.4"

I had similar error.我有类似的错误。 The simple trick that was to remove vendor folder partially created before and run composer install again.一个简单的技巧是删除之前部分创建的供应商文件夹并再次运行composer install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM