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

There are no commands defined in the "jwt" namespace (error) #205

Closed
ltiisidii opened this issue Aug 6, 2015 · 22 comments
Closed

There are no commands defined in the "jwt" namespace (error) #205

ltiisidii opened this issue Aug 6, 2015 · 22 comments

Comments

@ltiisidii
Copy link

I follow the steps as is explained in the wiki. But I have this error when generating the secretkey.

" [InvalidArgumentException]
There are no commands defined in the "jwt" namespace."

My version of laravel is laravel Framework version 5.1.9 (LTS)

as I can fix it?

@frenetic
Copy link

Just did a fresh install here, and everything seems to be working fine.
Are you sure you didnt missed one step from the Wiki?

If so, please, paste the code/commands you are trying to execute, so we can try to help.

@tymondesigns
Copy link
Owner

Yep, must be something else going on. Make sure you have set up the service provider etc

@jcaillot
Copy link

jcaillot commented Jan 17, 2017

Just my 50 cents
had the same issue while I was using cached configuration. php artisan config:clear solved the puzzle

@ujjaldey
Copy link

ujjaldey commented Apr 5, 2017

worked after clearing config cache.

@thanhtutoo
Copy link

omg, @jcaillot u saved me ,thanks

@Givemore
Copy link

you can uncomment ://$app->register(App\Providers\AppServiceProvider::class);
in bootstrap/app.php

@hadigun
Copy link

hadigun commented Aug 17, 2017

Clearing of config, save my day. php artisan config:clear

@leandroruel
Copy link

nothing is working to me... it's a fresh install and i followed all steps of the wiki... i will remove and install again from developer branch.

@akinolu52
Copy link

same here also any help @leandroruel

@leandroruel
Copy link

@akinolu52 i already solved my problem. just get the lastest release on develop branch and be happy

@dambrogia
Copy link

dambrogia commented Mar 18, 2018

For anyone running Laravel >=5.5 make sure you have "tymon/jwt-auth": "^1.0" in your composer.json. In the WIKI it states version compatibility.

@itshazlan
Copy link

thanks @dambrogia you saved my time :D

@weiweitoo
Copy link

Same issue with Laravel 5.7.8 here. I able to solved it by add following line in config/app.php

'providers' => [
    ....
    'Tymon\JWTAuth\Providers\JWTAuthServiceProvider',
],
'aliases' => [
    ....
    'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
        'JWTFactory' => 'Tymon\JWTAuth\Facades\JWTFactory',
],

Reference here

@marufmax
Copy link

Having the same issue in laravel 5.7 application.

just add "tymon/jwt-auth": "dev-develop" will solve your problem.

@irfanabdurrasyid
Copy link

Having the same issue in laravel 5.7 application.

just add "tymon/jwt-auth": "dev-develop" will solve your problem.

where your add script. are in .env?

@hackerunet
Copy link

hackerunet commented Oct 17, 2018

This doesn't work... I have a complete fresh install and none of the code added to the entire issue works for latest lumen.

@marufmax
Copy link

where your add script. are in .env?

in your composer.json file.

@hackerunet
Copy link

The issue here is the order how to do things, you have to enable all facades and providers first before attempting the jwt:secret from cli.

@philwamba
Copy link

philwamba commented Oct 23, 2018

I had the same issue in Laravel 5.7... Solved it by updating "tymon/jwt-auth": "^0.5" in composer.json file to "tymon/jwt-auth": "^1.0.0-rc.3"

"require": {
        ...
        "tymon/jwt-auth": "^1.0.0-rc.3",
        ...
    },

and then run

composer update

and finally, add following line in config/app.php

'providers' => [
    ....
    Tymon\JWTAuth\Providers\LaravelServiceProvider::class,
],
'aliases' => [
    ....
    'JWTAuth' => Tymon\JWTAuth\Facades\JWTAuth::class,
],

@mateusgalasso
Copy link

For anyone running Laravel >=5.5 make sure you are have "tymon/jwt-auth": "^1.0" in your composer.json. In the WIKI it states version compatibility.

Thank you

@mytuny
Copy link

mytuny commented Apr 7, 2019

use php artisan jwt:secret instead to generate the key.

@mhlanga-joseph
Copy link

@philwamba worked for me. 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