octobercms/october · error · ApplicationException

Package [$name] not found

Error message

Package [$name] not found

What it means

UpdateManager::installPlugin($name) (ManagesPlugins) first resolves the plugin code to a composer package via findPluginComposerCode() — which checks the local plugins/ directory and then the marketplace. When resolution yields no package, it throws 'Package [$name] not found'. The failure is about name resolution, not composer itself: nothing knows a composer package for the code you typed.

Source

Thrown at modules/system/classes/updatemanager/ManagesPlugins.php:22

use October\Rain\Composer\ComposerManager;
use ApplicationException;

/**
 * ManagesPlugins
 *
 * @package october\system
 * @author Alexey Bobkov, Samuel Georges
 */
trait ManagesPlugins
{
    /**
     * installPlugin using composer
     */
    public function installPlugin($name)
    {
        [$package, $version] = $this->findPluginComposerCode($name);
        if (!$package) {
            throw new ApplicationException("Package [$name] not found");
        }

        $composer = ComposerManager::instance();
        $composer->require([$package => $this->getComposerVersionConstraint($version)]);
    }

    /**
     * findPluginComposerCode locates a composer code for a plugin
     */
    protected function findPluginComposerCode(string $code): array
    {
        // Local
        if ($plugin = $this->pluginManager->findByIdentifier($code)) {
            $composerCode = $this->pluginManager->getComposerCode($plugin);
            $composerVersion = $this->versionManager->getLatestVersion($code);
        }
        // Remote
        else {

View on GitHub (pinned to b608633a7e)

Solutions

  1. Double-check the exact plugin code (Author.Plugin, correct casing) against the marketplace plugin page
  2. If it's a private plugin, add its composer repository and `composer require vendor/package` directly instead of plugin:install
  3. Verify network access to the update/marketplace gateway — discovery failures masquerade as 'not found'
  4. For local-only installs, place the plugin under plugins/author/plugin manually rather than using the installer

Example fix

// before — typo'd / unpublished plugin code
php artisan plugin:install Acme.Blogg
// after — exact code from the Marketplace page, or composer for private packages
php artisan plugin:install Acme.Blog
// or, for a composer-only plugin:
composer require acme/blog-plugin
Defensive patterns

Strategy: validation

Validate before calling

// Confirm the plugin code resolves before invoking the installer
$code = 'Acme.Blog'; // exact Author.Plugin casing
$knownLocally = \System\Classes\PluginManager::instance()->hasPlugin($code);
// otherwise verify it exists on the Marketplace: https://octobercms.com/plugin/Acme-Blog
if (!$knownLocally && !marketplacePluginExists($code)) {
    throw new InvalidArgumentException("Unknown plugin code {$code} — check spelling/casing");
}

Try / catch

try {
    \System\Classes\UpdateManager::instance()->installPlugin($code);
} catch (\October\Rain\Exception\ApplicationException $ex) {
    if (str_contains($ex->getMessage(), 'not found')) {
        // resolution failure — fall back to composer require with the known package name
        // exec('composer require vendor/package')
    }
}

Prevention

When it happens

Trigger: `php artisan plugin:install Foo.Bar` where Foo.Bar is not on disk, not discoverable on the October marketplace, or is only available in a composer repository that isn't configured; typo or wrong casing in the plugin code.

Common situations: Misspelled Author.Plugin code; private/composer-only plugins that were never published to the marketplace; marketplace discovery failing due to network/gateway errors (which degrade into 'not found'); plugin codes with different author casing than registered.

Related errors


AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21). Data as JSON: /api/errors/1f78c81978e6afaf. Report an issue: GitHub.