首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用composer安装软件包

无法使用composer安装软件包
EN

Stack Overflow用户
提问于 2018-05-01 17:50:08
回答 1查看 1.3K关注 0票数 1

我对php和drupal世界很陌生。我试图在本地运行我们的drupal应用程序。我已经安装了作曲家。还将最小稳定性配置为dev。当我试图运行composer安装时,会得到以下错误:在任何版本中都找不到所请求的包package_name,可能在包名中有一个错误。会为所有包引发错误。

代码语言:javascript
复制
{
    "name": "aws/drupal",
    "description": "Project template for Drupal 8 sites built with BLT.",
    "type": "project",
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "acquia/blt": "^8.8",
        "composer/installers": "^1.0.24",
        "wikimedia/composer-merge-plugin": "~1.3",
        "drupal/pathauto": "^1.0",
        "drupal/viewfield": "3.x-dev",
        "drupal/easy_breadcrumb": "^1.0",
        "drupal/paragraphs": "^1.1",
        "drupal/token": "^1.0",
        "drupal/video_embed_field": "^1.5",
        "drupal/ctools": "^3.0",
        "drupal/google_analytics": "2.1",
        "drupal/entity_reference_revisions": "^1.3",
        "drupal/views_infinite_scroll": "^1.3",
        "drupal/field_group": "~1.0",
        "drupal/addtoany": "^1.8",
        "drupal/colorbox": "^1.4",
        "drupal/features": "^3.5",
        "drupal/rabbit_hole": "~1.0",
        "drupal/redirect": "~1.0",
        "drupal/honeypot": "~1.0",
        "drupal/maxlength": "1.x-dev",
        "drupal/menu_link_attributes": "^1@beta",
        "drupal/cog": "^1.8",
        "jackmoore/colorbox": "^1.6",
        "stevenwanderski/bxslider-4": "^4.2",
        "matthieua/WOW": "^1.1",
        "drupal/csv_serialization": "^1.0",
        "drupal/contact_storage_export": "^1.10",
        "drupal/contact_block": "~1.0",
        "drupal/require_login": "~1.0",
        "drupal/linkit": "^4.3",
        "drupal/menu_trail_by_path": "^1.1",
        "drupal/link_attributes": "^1.1",
        "drupal/migrate_plus": "^4.0",
        "drupal/migrate_tools": "^4.0",
        "drupal/ubercart": "^4.0",
        "drupal/better_exposed_filters": "^3.0@alpha",
        "drupal/uc_stripe": "^2.0@alpha"
    },
    "require-dev": {},
    "extra": {
        "enable-patching": true,
        "installer-paths": {
            "docroot/core": [
                "type:drupal-core"
            ],
            "docroot/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "docroot/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "docroot/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "docroot/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "docroot/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "docroot/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ],
            "docroot/libraries/{$name}": [
                "type:drupal-library",
                "type:bower-asset",
                "type:npm-asset"
            ],
            "drush/contrib/{$name}": [
                "type:drupal-drush"
            ]
        },
        "merge-plugin": {
            "require": [
                "vendor/acquia/blt/composer.required.json",
                "vendor/acquia/blt/composer.suggested.json"
            ],
            "include": [
                "blt/composer.overrides.json"
            ],
            "merge-extra": true,
            "merge-extra-deep": true,
            "merge-scripts": true,
            "replace": true
        },
        "patches": {
            "drupal/core": {
                "Contextual links broken fix": "https://www.drupal.org/files/issues/contextual_links_broken-2033275-10.patch"
            },
            "drupal/ubercart": {
                "Call to a member function label() on null": "https://www.drupal.org/files/issues/ubercart.call_to_a_member-2788963-10.patch"
            }
        },
        "installer-types": [
            "bower-asset",
            "npm-asset"
        ]
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "jackmoore/colorbox",
                "version": "1.6.4",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/jackmoore/colorbox/archive/master.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "stevenwanderski/bxslider-4",
                "version": "4.2.12",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/stevenwanderski/bxslider-4/archive/master.zip",
                    "type": "zip"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "matthieua/WOW",
                "version": "1.1.3",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/matthieua/WOW/archive/master.zip",
                    "type": "zip"
                }
            }
        }
    ]
} 

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2018-05-02 17:58:24

很明显,问题是当我克隆回购时,我有旧的依赖关系。我必须删除供应商目录并重新运行composer安装命令。解决了问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50121276

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档