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

Install failed. #2083

Closed
JYang99 opened this issue Dec 28, 2020 · 19 comments
Closed

Install failed. #2083

JYang99 opened this issue Dec 28, 2020 · 19 comments

Comments

@JYang99
Copy link

JYang99 commented Dec 28, 2020

Laravel version: 8.20.1
Php version: 8.0

When I am trying composer require tymon/jwt-auth, it return me that error below.

Using version ^0.5.12 for tymon/jwt-auth
./composer.json has been updated
Running composer update tymon/jwt-auth
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
- tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Below is my composer.json file.

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"darkaonline/l5-swagger": "^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"illuminate/support": "^8.20",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5",
"namshi/jose": "^7.2",
"zircote/swagger-php": "^3.1"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^0.0.5",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}

@peter842323
Copy link

This package does not support php 8.0 now :(
You can try use php 7.4 again

@Ekenzy-101
Copy link

This package does not support php 8.0 now :(
You can try use php 7.4 again

How do you go about it?

@damonto
Copy link

damonto commented Dec 31, 2020

@Ekenzy-101 You can add --ignore-platform-reqs to force install it works well for me.

composer require tymon/jwt-auth --ignore-platform-reqs

@rmncv
Copy link

rmncv commented Dec 31, 2020

@Ekenzy-101 You can add --ignore-platform-reqs to force install it works well for me.

composer require tymon/jwt-auth --ignore-platform-reqs

Doesn't help if project have same dependencies with different requirements to a minimum versions :(

@JYang99
Copy link
Author

JYang99 commented Jan 1, 2021

Ohhh ... It successfully downloaded.

@JYang99 JYang99 closed this as completed Jan 1, 2021
@noor-ul-amin0
Copy link

@Ekenzy-101 You can add --ignore-platform-reqs to force install it works well for me.
composer require tymon/jwt-auth --ignore-platform-reqs

Doesn't help if project have same dependencies with different requirements to a minimum versio

Ohhh ... It successfully downloaded.

How did you solve it?

@damonto
Copy link

damonto commented Feb 4, 2021

Which version are u using?

composer require tymon/jwt-auth:^1.0. --ignore-platform-reqs

@noor-ul-amin0
Copy link

noor-ul-amin0 commented Feb 4, 2021 via email

@oviniciusfeitosa
Copy link

composer require tymon/jwt-auth:^1.0.2

@anchal-1999
Copy link

anchal-1999 commented Apr 15, 2021

laravet v =8
php v =7.3|^8.0
When I am trying composer require tymon/jwt-auth, it return me that error below.

D:\pcoder_laravel\AutoRiders>composer require tymon/jwt-auth
Using version ^0.5.12 for tymon/jwt-auth
./composer.json has been updated
Running composer update tymon/jwt-auth
Loading composer repositories with package #information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
- tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

here is my composer

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.3",
"laravel/framework": "^8.12",
"laravel/passport": "^10.1",
"laravel/sanctum": "^2.9",
"laravel/tinker": "^2.5",
"laravel/ui": "^3.2",
"wildbit/swiftmailer-postmark": "^3.3"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"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-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
}

@lecchereng
Copy link

Are there any udates?
I'm using last version of Laravel and last version of php (the last released with xamp,
php --version
PHP 8.0.3 (cli) (built: Mar 2 2021 23:34:05) ( ZTS Visual C++ 2019 x64 )

laravel --version
Laravel Installer 4.2.4
php artisan --version
Laravel Framework 8.38.0
composer --version
Composer version 2.0.12 2021-04-01 10:14:59

composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.12",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"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-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
}

@ziayamin
Copy link

laravel8:
composer require -w tymon/jwt-auth --ignore-platform-reqs

composer.json:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4.1",
"fruitcake/laravel-cors": "^2.0.3",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.0",
"laravel/passport": "^10.0",
"laravel/tinker": "^2.5|dev-develop",
"paragonie/random_compat": "2.*",
"tymon/jwt-auth": "^1.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}

@Nicolas-yonedA
Copy link

Now, jwt-auth is installable with PHP8.0 on version dev-develop.

composer require tymon/jwt-auth:"dev-develop"

@AD-Amlas
Copy link

@Nicolas-yonedA Thanks .. it worked for me

@gustavodsv
Copy link

@Ekenzy-101 You can add --ignore-platform-reqs to force install it works well for me.

composer require tymon/jwt-auth --ignore-platform-reqs

Great!! ty

@ramandamaulana
Copy link

Now, jwt-auth is installable with PHP8.0 on version dev-develop.

composer require tomfordrumm/jwt-auth:dev-develop

@jdbbdj
Copy link

jdbbdj commented Mar 29, 2022

Now, jwt-auth is installable with PHP8.0 on version dev-develop.

composer require tomfordrumm/jwt-auth:dev-develop

This was a great answer @March32022

@lucianobargmann
Copy link

This package is dead and abandoned. Use tomfordrumm/jwt-auth

@AhmedMub
Copy link

If you are using Laravel 9 to use JWT-auth you should use php-open-source-saver/jwt-auth it is forked of tymondesign/jwt-auth, because tymondesign/jwt-auth appears to have been abandoned and isn’t compatible with Laravel 9.

composer require php-open-source-saver/jwt-auth

I suggest using sanctum instead it's lightweight, newer, more robust, and easier to implement.

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