User123123
User123123

Reputation: 19

Composer not installing a package

"staudenmeir/eloquent-json-relations" not installing via composer install. I have added this package through composer require command, it has been installed successfully.But not installing on server via composer install.But downloading on composer update. Here is my composer.json. I only pushed composer.json. Here is the package link 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

}

Upvotes: 0

Views: 1542

Answers (1)

kamil-kubicki
kamil-kubicki

Reputation: 628

Try proceed the composer installation without library that cause the problem. Then use the command to add missing dependency to the list.

run composer require staudenmeir/eloquent-json-relations:"^1.1"

run again composer install

an alternative is just to define full dependency tree from the beginning - but I think this is not you have done (assume that looking on extra spacing before 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

Upvotes: 2

Related Questions