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.

    评论

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)