{"record":{"id":"1f78c81978e6afaf","repo":"octobercms/october","slug":"package-name-not-found","errorCode":null,"errorMessage":"Package [$name] not found","messagePattern":"Package \\[\\$name\\] not found","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/system/classes/updatemanager/ManagesPlugins.php","lineNumber":22,"sourceCode":"use October\\Rain\\Composer\\ComposerManager;\nuse ApplicationException;\n\n/**\n * ManagesPlugins\n *\n * @package october\\system\n * @author Alexey Bobkov, Samuel Georges\n */\ntrait ManagesPlugins\n{\n    /**\n     * installPlugin using composer\n     */\n    public function installPlugin($name)\n    {\n        [$package, $version] = $this->findPluginComposerCode($name);\n        if (!$package) {\n            throw new ApplicationException(\"Package [$name] not found\");\n        }\n\n        $composer = ComposerManager::instance();\n        $composer->require([$package => $this->getComposerVersionConstraint($version)]);\n    }\n\n    /**\n     * findPluginComposerCode locates a composer code for a plugin\n     */\n    protected function findPluginComposerCode(string $code): array\n    {\n        // Local\n        if ($plugin = $this->pluginManager->findByIdentifier($code)) {\n            $composerCode = $this->pluginManager->getComposerCode($plugin);\n            $composerVersion = $this->versionManager->getLatestVersion($code);\n        }\n        // Remote\n        else {","sourceCodeStart":4,"sourceCodeEnd":40,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/system/classes/updatemanager/ManagesPlugins.php#L4-L40","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Double-check the exact plugin code (Author.Plugin, correct casing) against the marketplace plugin page","If it's a private plugin, add its composer repository and `composer require vendor/package` directly instead of plugin:install","Verify network access to the update/marketplace gateway — discovery failures masquerade as 'not found'","For local-only installs, place the plugin under plugins/author/plugin manually rather than using the installer"],"exampleFix":"// before — typo'd / unpublished plugin code\nphp artisan plugin:install Acme.Blogg\n// after — exact code from the Marketplace page, or composer for private packages\nphp artisan plugin:install Acme.Blog\n// or, for a composer-only plugin:\ncomposer require acme/blog-plugin","handlingStrategy":"validation","validationCode":"// Confirm the plugin code resolves before invoking the installer\n$code = 'Acme.Blog'; // exact Author.Plugin casing\n$knownLocally = \\System\\Classes\\PluginManager::instance()->hasPlugin($code);\n// otherwise verify it exists on the Marketplace: https://octobercms.com/plugin/Acme-Blog\nif (!$knownLocally && !marketplacePluginExists($code)) {\n    throw new InvalidArgumentException(\"Unknown plugin code {$code} — check spelling/casing\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    \\System\\Classes\\UpdateManager::instance()->installPlugin($code);\n} catch (\\October\\Rain\\Exception\\ApplicationException $ex) {\n    if (str_contains($ex->getMessage(), 'not found')) {\n        // resolution failure — fall back to composer require with the known package name\n        // exec('composer require vendor/package')\n    }\n}","preventionTips":["Copy plugin codes verbatim from the Marketplace page (mind casing)","For private plugins, skip plugin:install and use composer with an explicit repository","Script installs from a vetted manifest of codes/packages rather than typing them ad hoc"],"tags":["octobercms","plugin","composer","marketplace","install"],"backgroundTag":"package-not-found","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}