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

In ProviderRepository.php line 208: Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found #1678

Open
msyadav88 opened this issue Oct 4, 2018 · 13 comments

Comments

@msyadav88
Copy link

msyadav88 commented Oct 4, 2018

while running below command
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\JWTAuthServiceProvider"

I am getting the below error

In ProviderRepository.php line 208: Class 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' not found

I am using laravel 5.7 and jwt-auth 1.0

@haidang666
Copy link

try this instead
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

@xdiegom
Copy link

xdiegom commented Nov 11, 2018

@msyadav88 Documentation says that for Laravel 5.4 or below, add the ServiceProvider in the app config file.
I am using Laravel 5.7 too and had the same problem.

I realized that when you ran composer require tymon/jwt-auth, it installed the version 0.5.12 and not the last version 1.0 in composer.json file. So what I did was to manually change the version to 1.0 and ran composer update. Then ran the publish command: php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider" and it worked 🙂

Hope it helps!

@tommie24
Copy link

tommie24 commented Jan 4, 2019

Run
composer require tymon/jwt-auth:dev-develop --prefer-source

@willystadnick
Copy link

Got into this problem too 😞

Merely running [1]

composer require tymon/jwt-auth:dev-develop --prefer-source
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

Was not being enough to solve it for me.

I had to rollback versioning and execute composer install to have a working app again.

Then I executed [1] again and got composer dependency of tymon/jwt-auth set to ^1.0 and the publishing success, as expected.

@WesVicent
Copy link

To solve:

Make sure that you're using the last version of Tymon/JWTAuth, if you not just run:
composer require tymon/jwt-auth:1.0.* --prefer-source

Then go to config/app.php and change "JWTAuthServiceProvider" line (below)

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

to

'providers' => [
...
'Tymon\JWTAuth\Providers\LaravelServiceProvider' ,
...
]

Then run:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

What it happens?

Tymon just changed the provider name when updated, wanna see? Ok.
Just go to YourProj\vendor\tymon\jwt-auth\src\Providers there you'll find the "LaravelServiceProvider.php", before (previous versions) "JWTAuthServiceProvider.php".

Bye. ♥

@assadullahchaudhry
Copy link

To solve:

Make sure that you're using the last version of Tymon/JWTAuth, if you not just run:
composer require tymon/jwt-auth:1.0.* --prefer-source

Then go to config/app.php and change "JWTAuthServiceProvider" line (below)

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

to

'providers' => [
...
'Tymon\JWTAuth\Providers\LaravelServiceProvider' ,
...
]

Then run:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

What it happens?

Tymon just changed the provider name when updated, wanna see? Ok.
Just go to YourProj\vendor\tymon\jwt-auth\src\Providers there you'll find the "LaravelServiceProvider.php", before (previous versions) "JWTAuthServiceProvider.php".

Bye. ♥

Thanks. It worked for me. I'm using Laravel 5.8. :)

@ghost
Copy link

ghost commented Jun 15, 2019

To solve:

Make sure that you're using the last version of Tymon/JWTAuth, if you not just run:
composer require tymon/jwt-auth:1.0.* --prefer-source

Then go to config/app.php and change "JWTAuthServiceProvider" line (below)

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

to

'providers' => [
...
'Tymon\JWTAuth\Providers\LaravelServiceProvider' ,
...
]

Then run:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

What it happens?

Tymon just changed the provider name when updated, wanna see? Ok.
Just go to YourProj\vendor\tymon\jwt-auth\src\Providers there you'll find the "LaravelServiceProvider.php", before (previous versions) "JWTAuthServiceProvider.php".

Bye. ♥

Heyyy thanks, work in L5.8 <3

@BeardKoda
Copy link

BeardKoda commented Sep 29, 2019


...
'Tymon\JWTAuth\Providers\JWTAuthServiceProvider' ,
...
]

to

'providers' => [

Thanks This worked!! laravel 5.8

@mnsuccess
Copy link

To solve:

Make sure that you're using the last version of Tymon/JWTAuth, if you not just run:
composer require tymon/jwt-auth:1.0.* --prefer-source

Then go to config/app.php and change "JWTAuthServiceProvider" line (below)

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

to

'providers' => [
...
'Tymon\JWTAuth\Providers\LaravelServiceProvider' ,
...
]

Then run:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

What it happens?

Tymon just changed the provider name when updated, wanna see? Ok.
Just go to YourProj\vendor\tymon\jwt-auth\src\Providers there you'll find the "LaravelServiceProvider.php", before (previous versions) "JWTAuthServiceProvider.php".

Bye. ♥

Thank you !! worked using Laravel 7

@afifalfiano
Copy link

To solve:

Make sure that you're using the last version of Tymon/JWTAuth, if you not just run:
composer require tymon/jwt-auth:1.0.* --prefer-source

Then go to config/app.php and change "JWTAuthServiceProvider" line (below)

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

to

'providers' => [
...
'Tymon\JWTAuth\Providers\LaravelServiceProvider' ,
...
]

Then run:
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

What it happens?

Tymon just changed the provider name when updated, wanna see? Ok.
Just go to YourProj\vendor\tymon\jwt-auth\src\Providers there you'll find the "LaravelServiceProvider.php", before (previous versions) "JWTAuthServiceProvider.php".

Bye. ♥

Thank you, it worked on laravel 7

@opsquid
Copy link

opsquid commented Dec 24, 2020

php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

Thanks, it worked on laravel 8

@mestartlearncode
Copy link

Got into this problem too 😞

Merely running [1]

composer require tymon/jwt-auth:dev-develop --prefer-source
php artisan vendor:publish --provider="Tymon\JWTAuth\Providers\LaravelServiceProvider"

Was not being enough to solve it for me.

I had to rollback versioning and execute composer install to have a working app again.

Then I executed [1] again and got composer dependency of tymon/jwt-auth set to ^1.0 and the publishing success, as expected.

thanks it works. before on Laravel 5.8

@peppeg85
Copy link

peppeg85 commented Feb 5, 2021

hello, sorry but i still can't solve, any suggestions?, i tried also latest comment but nothing, i'm on laravel 8, it doesn't recgnixze JWTAuth

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