John Davidson

php - Unable to locate publishable resources installing jwt-auth with composer

0 comments
Message:


I' trying to install jwt-aut on a laravel 6 project using composer, this is composer.json


{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"laravel/framework": "^6.20",
"laravel/tinker": "^2.5",
"tymon/jwt-auth": "^1.0"
},

and I added this line to providers array in app.php


Tymon\JWTAuth\Providers\LaravelServiceProvider::class,

I executed cpmposer.install but following the doc instructions I execute


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

but I get


Unable to locate publishable resources.
Publishing complete.

I'm stuck here



My Answer:
It seems like the publishable resources for jwt-auth are not being found. This could be due to a few reasons:

1. Make sure that the provider class `Tymon\JWTAuth\Providers\LaravelServiceProvider::class` is correctly added to the providers array in your `config/app.php` file.

2. Check if the `jwt.php` configuration file is present in the `config` directory of your Laravel project. If it is not present, you may need to manually create it.

3. Try running `php artisan vendor:publish --tag=jwt` instead of specifying the provider directly. This command will publish all the necessary configuration files for jwt-auth.

4. Make sure that the jwt-auth package is correctly installed and updated by running `composer update tymon/jwt-auth`.

If you have tried all of the above and are still facing issues, you may want to reach out to the jwt-auth community or check their documentation for further assistance.

Rate this post

5 of 5 based on 5168 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us