Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to install package #75

Closed
ahmad-mujamil opened this issue Feb 1, 2023 · 14 comments
Closed

unable to install package #75

ahmad-mujamil opened this issue Feb 1, 2023 · 14 comments

Comments

@ahmad-mujamil
Copy link

- Root composer.json requires staudenmeir/belongs-to-through ^2.13 -> satisfiable by staudenmeir/belongs-to-through[v2.13]. - staudenmeir/belongs-to-through v2.13 requires illuminate/database ^10.0 -> found illuminate/database[10.x-dev] but it conflicts with another require.

please help

@staudenmeir
Copy link
Owner

Hi @ahmad-mujamil,
Is that the whole error message? Can you share your composer.json file?

@msulaimanmisri
Copy link

msulaimanmisri commented Feb 1, 2023

The same goes for me @staudenmeir. Here's my composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^8.0",
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.6",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.0",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

@staudenmeir
Copy link
Owner

@msulaimanmisri Did you use the exact command from the README?

@msulaimanmisri
Copy link

Yep sure @staudenmeir , I also tried to install using another version such as 2.9 & 2.10. I have also failed.

But the error is not the same if I run composer require staudenmeir/belongs-to-through:"^2.5"

2.9 and 2.10 show errors PHP Version incompatible,. I'm using PHP version 8.1.2.

@staudenmeir
Copy link
Owner

Please try composer require staudenmeir/belongs-to-through:"^2.12".

@msulaimanmisri
Copy link

Yeah. It's work if I run composer require staudenmeir/belongs-to-through:"^2.12".

Also tested my logic using what the instruction mentioned in README.

@staudenmeir
Copy link
Owner

What operating system and terminal are you using?

@msulaimanmisri
Copy link

msulaimanmisri commented Feb 1, 2023

I'm using Windows 10 and the terminal is coming from VSCode version 1.74.3, Powershell

@msulaimanmisri
Copy link

Just to let you know @staudenmeir , I also ran composer require staudenmeir/belongs-to-through:"^^^^2.5" before this and still the error appears.

@staudenmeir
Copy link
Owner

Thanks. What does your composer.json look like now?

@msulaimanmisri
Copy link

Here's my composer.json look right now :

"require": {
        "php": "^8.0",
        "staudenmeir/belongs-to-through": "2.12"
    }

@staudenmeir
Copy link
Owner

staudenmeir commented Feb 1, 2023

It should be "staudenmeir/belongs-to-through": "^2.12" so you get all the updates.

What does composer update staudenmeir/belongs-to-through:"^^^^2.12" give you?

@ahmad-mujamil
Copy link
Author

ahmad-mujamil commented Feb 2, 2023

@staudenmeir

yes that the only error i get..
this my composer.json

"require": {
"php": "^8.0.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/fortify": "^1.16",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7",
"livewire/livewire": "^2.10",
"predis/predis": "^2.0",
"rappasoft/laravel-authentication-log": "^2.0",
"realrashid/sweet-alert": "^5.1",
"spatie/laravel-permission": "^5.7",
"torann/geoip": "^3.0",
"yajra/laravel-datatables-oracle": "^10.2"

@ahmad-mujamil
Copy link
Author

Hi @staudenmeir
it solve using "staudenmeir/belongs-to-through": "^2.12" this version

thanks ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants