2

我已经下载了 spark v1.0.5 并在我的 laravel-project 根目录中提取了名称“spark”然后我用存储库更新了我的 composer.json 文件,require 和 laravel-project 的 composer.json 看起来像这样


{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "daem0ndev/laravel-spark": "dev-master",
        "intervention/image": "^2.3",
        "felixkiss/uniquewith-validator": "2.*",
        "laravel/cashier": "~6.0",
        "laravel/spark": "~1.0"

    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "symfony/css-selector": "2.8.*|3.0.*",
        "symfony/dom-crawler": "2.8.*|3.0.*"
    },
    "repositories": [
    {
        "type": "path",
        "url": "./spark"
    }
    ],
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "scripts": {
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ],
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "pre-update-cmd": [
            "php artisan clear-compiled"
        ],
        "post-update-cmd": [
            "php artisan optimize"
        ]
    },
    "config": {
        "preferred-install": "dist"
    }
}

在此之后,当我从我的 laravel-project 目录运行命令时

composer update
它显示以下错误
php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1 - The requested package laravel/spark could not be found in any version, there may be a typo in the package name.

Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

4

1 回答 1

1

我必须添加这个 "laravel/spark": "*@dev" ,详情请查看这里

于 2017-11-19T12:47:43.733 回答