作曲家未安装软件包

时间:2019-11-27 05:21:49

标签: laravel laravel-5 composer-php lumen

“ staudenmeir / eloquent-json-relations”未通过composer安装进行安装。 我已经通过composer require命令添加了这个软件包,它已经成功安装了。但是不是通过composer install在服务器上安装的,而是在composer更新时下载的。这是我的composer.json。 我只推送了composer.json。 这是软件包链接https://github.com/staudenmeir/eloquent-json-relations

{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=7.1.3",
    "doctrine/dbal": "^2.9",
    "guzzlehttp/guzzle": "^6.3",
    "kreait/firebase-php": "^4.0",
    "laravel/lumen-framework": "5.7.*",
    "lcobucci/jwt": "^3.2",
    "league/flysystem-aws-s3-v3": "~1.0",
     "staudenmeir/eloquent-json-relations": "^1.1",
    "vlucas/phpdotenv": "~2.2"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "phpunit/phpunit": "~7.0",
    "mockery/mockery": "~1.0"
},
"autoload": {
    "classmap": [
        "database/seeds",
        "database/factories"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/"
    ]
},
"scripts": {
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true

}

1 个答案:

答案 0 :(得分:1)

尝试在没有引起问题的库的情况下继续进行作曲家安装。 然后使用命令将缺少的依赖项添加到列表中。

运行作曲家需要staudenmeir / eloquent-json-relations:“ ^ 1.1”

再次运行composer安装

另一种选择是从一开始就定义完整的依赖树-但我认为这还不是您要做的(假设在staudenmeir / eloquent-json-relations之前查找额外的间距)

composer require staudenmeir/eloquent-json-relations:"^1.1"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing staudenmeir/eloquent-json-relations (v1.1.6): Downloading (100%)
Writing lock file
Generating optimized autoload files