1

I'm trying to install JWT in laravel but after a while I get this error. I had installed it before but I had to remove it (using composer remove) because I was not using it

Img: Error

2 Answers 2

1

It says

Target class [auth] does not exist

Make sure you have that correct in your current Laravel code, check for any residues, doesn't need to be in JWT it can be in your own app code, nonetheless that's where you want to start from.


More to that

The issue isn't in the installation i believe, as the error is coming after php artisan package:discover i believe that if you do composer dump-autoload you will get the same error even without installing that package, try that, if that's the case, then it's surely somewhere in your app code

Sign up to request clarification or add additional context in comments.

3 Comments

Yes, it gives me the same error... Is there a way to find the error in the code?
It's a matter of debugging now, you need to search for auth class in your code, check laravel logs at /storage/log and follow the stacks it should lead you to where it's being used,
my best friend here is my IDE phpStorm (ctrl+f5) search for auth and look through the list whatever is in my /app directory or any directory that is not from vendors, takes few seconds to find it
1

Try deleting your composer.lock file on the root directory of the project and try again.

Hope it helps!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.