octobercms/october · error · ApplicationException
Package [$name] not found
Error message
Package [$name] not found
What it means
Thrown by UpdateManager::installTheme() when a theme cannot be resolved to a composer package. findThemeComposerCode() first checks locally (themeManager->findByIdentifier + getComposerCode + getLatestVersion) and then falls back to the update server (requestThemeDetails -> requestServerData('package/detail')). If neither path yields a composer_code, installTheme aborts with 'Package [$name] not found' before composer require ever runs.
Source
Thrown at modules/system/classes/updatemanager/ManagesThemes.php:27
use October\Rain\Filesystem\Zip;
use ApplicationException;
/**
* ManagesThemes
*
* @package october\system
* @author Alexey Bobkov, Samuel Georges
*/
trait ManagesThemes
{
/**
* installTheme using composer
*/
public function installTheme($name)
{
[$package, $version] = $this->findThemeComposerCode($name);
if (!$package) {
throw new ApplicationException("Package [$name] not found");
}
$composer = ComposerManager::instance();
$composer->require([$package => $this->getComposerVersionConstraint($version)]);
// Lock theme
$themeFolder = strtolower(str_replace('.', '-', System::composerToOctoberCode($package)));
$this->themeManager->createChildTheme($themeFolder);
$this->themeManager->performLockOnTheme($themeFolder);
}
/**
* findThemeComposerCode locates a composer code for a plugin
*/
protected function findThemeComposerCode(string $code): array
{
// Local
if ($this->themeManager->findByIdentifier($code)) {View on GitHub (pinned to b608633a7e)
Solutions
- Verify the exact theme code (Author.Name) on the theme's octobercms.com marketplace page and retry with that code
- Check the response of UpdateManager::instance()->requestThemeDetails($name) and confirm the composer_code key is present and non-empty
- For private themes, bypass installTheme: add your own composer repository, run composer require vendor/package, then lock the theme from the backend
- If the gateway request itself fails, fix network/DNS access to the update server, clear cached update metadata, and retry
Example fix
// before
UpdateManager::instance()->installTheme($name);
// after
$details = UpdateManager::instance()->requestThemeDetails($name);
if (empty($details['composer_code'])) {
throw new RuntimeException("Theme [{$name}] is not resolvable to a composer package; install it via composer manually.");
}
UpdateManager::instance()->installTheme($name); Defensive patterns
Strategy: validation
Validate before calling
$details = \UpdateManager::instance()->requestThemeDetails($themeName);
if (empty($details['composer_code'])) {
// do not call installTheme; surface an actionable message or install via composer directly
} Try / catch
try { \UpdateManager::instance()->installTheme($name); } catch (\ApplicationException $ex) { /* show $ex->getMessage() to the user; log for support */ } Prevention
- Always copy theme codes verbatim from the marketplace product page
- For private themes, use composer require from your own repository instead of installTheme
- Log the requestThemeDetails response when building install tooling so empty composer_code is visible
When it happens
Trigger: Calling UpdateManager::instance()->installTheme('Author.Theme') where the theme is neither installed locally with a recorded composer code nor returned by the marketplace gateway (details['composer_code'] empty); typo in the theme code; theme removed from the marketplace; gateway unreachable so the remote lookup returns nothing usable.
Common situations: Installing a theme by a code copied from an outdated marketplace URL; private/custom themes never published to the October marketplace; a corporate firewall blocking the update gateway so the details payload comes back empty.
Related errors
- Package [$name] not found
- system::lang.updates.theme_not_found
- Values not found for the selected row.
- cms::lang.layout.not_found_name
- cms::lang.cms_object.invalid_file
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/6b3774c5b1c8f7a4.
Report an issue: GitHub.