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



我尝试安装作曲家,但它不起作用,并在执行不同的不同步骤后给出下面提到的问题。如果您知道如何解决,请提供帮助

[Composer\Repository\InvalidRepositoryException]
在 的任何分支或标签中均未找到有效的 bower.json https://github.com/jquery/jquery-dist.git,无法加载包 从它。

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

提供密钥,一段时间后它说权限问题无法创建供应商文件夹,授予文件夹权限并运行

composer update

它给出了上述错误,然后我运行

composer clear-cache
composer install

给出密钥,但不给出上述问题。

下面提到的是我的作曲家文件。

{
    "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"
        }
    }
}

我需要看看你的作曲家.json,但是我可以看到你已经尝试过

composer clear-cache在您的项目中。

所以试试这个:

转到/root/.composer 目录,创建文件 config.json 并将这些命令放入其中。

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

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

将以下代码添加到 composer.json 文件中

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

如果仍然不起作用。尝试删除 fxp/作曲家-资产-插件:

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

我通过将作曲家资产插件更新到最新版本来解决它:

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

我也有类似的错误。简单的技巧是删除之前部分创建的供应商文件夹并再次运行composer install

相关内容

  • 没有找到相关文章

最新更新