Skip to content

HOW TO FIX THIS ERROR: No publishable resources for tag [auto-translate-config] and "Spatie\LaravelPackageTools\PackageServiceProvider" not found ??? #2

Open

Description

@chegmarco1989

Hello.

After installing the package on Laravel 9 and adding the package in provider array into config/app.php:

\Devaslanphp\AutoTranslate\AutoTranslateProvider::class,

When I try to publish package doing this:

php artisan vendor:publish --tag=auto-translate-config

I get this error:

In AutoTranslateProvider.php line 10:

  Class "Spatie\LaravelPackageTools\PackageServiceProvider" not found

But when I comment it like this:

// \Devaslanphp\AutoTranslate\AutoTranslateProvider::class,

And repeat this:

php artisan vendor:publish --tag=auto-translate-config

I get:

INFO No publishable resources for tag [auto-translate-config].

How to fix this error ???

Activity

  1. riansyh commented on Jul 17, 2023

    @riansyh

    Hello.

    After installing the package on Laravel 9 and adding the package in provider array into config/app.php:

    \Devaslanphp\AutoTranslate\AutoTranslateProvider::class,

    When I try to publish package doing this:

    php artisan vendor:publish --tag=auto-translate-config

    I get this error:

    In AutoTranslateProvider.php line 10:
    
      Class "Spatie\LaravelPackageTools\PackageServiceProvider" not found
    

    But when I comment it like this:

    // \Devaslanphp\AutoTranslate\AutoTranslateProvider::class,

    And repeat this:

    php artisan vendor:publish --tag=auto-translate-config

    I get:

    INFO No publishable resources for tag [auto-translate-config].

    How to fix this error ???

    you can try to run this command to install the laravel-package-tools
    composer require spatie/laravel-package-tools or if there is any error, you can try the following command: composer require spatie/laravel-package-tools:*

    I had the same error as you, but after running the command, it worked in my project.

  2. tfranssen commented on Apr 9, 2024

    @tfranssen

    I guess it is not working for laravel 11

  3. jeffersongoncalves commented on Apr 18, 2024

    @jeffersongoncalves

    Open PR #7.

    Adjust this dependency on spatie/laravel-package-tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions