douhuangjian9627 2018-05-01 17:50
浏览 203

无法使用composer安装软件包

I am new to php and drupal world. I am trying to run our drupal application locally. I have installed composer. Also have configured minimum stability to be dev. When I try to run composer install, I get following error: The requested package package_name could not be found in any version, there may be a typo in the package name. It throws errors for all the packages.

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

Thanks.

  • 写回答

1条回答

  • dongxi7704 2018-05-02 17:58
    关注

    Apparently the problem was I had old dependencies when I cloned the repo. I had to remove the vendor directory and re run the composer install command. That solved the problem.

    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料