Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Node.js, PHP and APIs

php artisan vendor:publish copies nothing for a package tag or provider

Your error

No publishable resources for tag [migrations].1 more line it can show

Fix it fast

Most common cause, 1 of 3

The tag or provider name does not match what the package registers

Use the exact tag the provider registers, or publish everything from that provider with --provider.

Fix
php artisan vendor:publish --tag=courier-config
# or every file the provider offers
php artisan vendor:publish --provider="Acme\Courier\CourierServiceProvider"
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

"No publishable resources for tag [x]" (Laravel 6.x printed "Unable to locate publishable resources") means vendor:publish found no file registered under that tag or provider. Either the tag name is wrong, or the package's service provider never loaded because discovery is stale or disabled. Pick the tag from the interactive list, or run package:discover. Applies to Laravel 12 and 13.

  • Applies to Laravel 13.43 (PHP 8.3 to 8.5), Laravel 12 (PHP 8.2 to 8.5), Composer 2
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Run vendor:publish without options. It prompts with every provider and tag that has files registered. If your package is in the list, the tag you typed is the problem; if it is missing, its provider is not loaded.

Run this first
php artisan vendor:publish

Then find the line you see in this list and open its fix:

  1. 1The tag or provider name does not match what the package registersThe package's provider shows up in the interactive list, but under different tag names than the one you passed
  2. 2The package's service provider is not loadedThe package is in vendor/ but neither its provider nor its tags appear in the interactive list
  3. 3The file you want is one of Laravel's own, which has its own commandYou are after a framework file, such as a config file missing from config/ or the lang directory, not a package's files

What does the error look like?

  • No publishable resources for tag [migrations].
  • Unable to locate publishable resources.

Cause 1 of 3

The tag or provider name does not match what the package registers

You seeThe package's provider shows up in the interactive list, but under different tag names than the one you passed

Check

No publishable resources for tag [...] is printed when the list of paths for that tag comes back empty. A package registers its files with publishes() and an optional tag such as courier-config, so a tag taken from an old README, a typo, or a provider and tag pair that the package never combined all leave that list empty.

Check
grep -rn "publishes" vendor/acme/courier/src/*ServiceProvider.php

Fix

Use the exact tag the provider registers, or publish everything from that provider with --provider.

Fix
php artisan vendor:publish --tag=courier-config
# or every file the provider offers
php artisan vendor:publish --provider="Acme\Courier\CourierServiceProvider"

Verify

The command lists each file it copies, and the files appear in config/, database/migrations/ or wherever the package targets.

Verify
git status --short config database

Confirmed by github.com

Did this fix it?

Cause 2 of 3

The package's service provider is not loaded

You seeThe package is in vendor/ but neither its provider nor its tags appear in the interactive list

Check

If the provider never boots, its publishes() calls never run and vendor:publish has nothing to offer. Laravel loads package providers from the discovery manifest in bootstrap/cache/packages.php. That file is rebuilt by the package:discover step Composer runs after autoload dumps, so an install with --no-scripts can leave a stale manifest without the new package; a dont-discover entry in composer.json skips it on purpose.

Check
grep -n "acme/courier" bootstrap/cache/packages.php
grep -n -A4 '"dont-discover"' composer.json

Fix

Rebuild the manifest. If the package is excluded from discovery, or has no discovery entry, list its provider in bootstrap/providers.php yourself.

Fix
php artisan package:discover

// bootstrap/providers.php
return [
    App\Providers\AppServiceProvider::class,
    Acme\Courier\CourierServiceProvider::class,
];

Verify

The manifest now holds an entry for the package, and the interactive vendor:publish list shows its provider and tags.

Verify
grep -n "acme/courier" bootstrap/cache/packages.php

Confirmed by laravel.com

Did this fix it?

Cause 3 of 3

The file you want is one of Laravel's own, which has its own command

You seeYou are after a framework file, such as a config file missing from config/ or the lang directory, not a package's files

Check

Current Laravel skeletons leave some framework files out, and vendor:publish is not how you get them back. A few configuration files, cors.php and view.php among them, are not published by default, and there is no lang directory until you create it.

Check
ls config/ lang/ 2>&1

Fix

Use the dedicated commands: config:publish for configuration files, lang:publish for the language files.

Fix
php artisan config:publish          # pick the file from the list
php artisan config:publish --all
php artisan lang:publish

Verify

The configuration file you picked is now in config/, and the lang directory holds the default language files.

Verify
ls config/ lang/en

Confirmed by laravel.com

Did this fix it?

How do I stop it coming back?

  • Copy publish commands from the README of the exact package version in composer.lock, not from older posts.
  • In Docker or CI builds that use composer install --no-scripts, run php artisan package:discover as a separate step afterwards.
  • Commit the published files you edit (config, migrations, views), so a fresh clone never depends on re-publishing them.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: Spotless Laundry, EZ Estimater.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.