octobercms/october · error · SystemException

Vue component class not found: %s

Error message

Vue component class not found: %s

What it means

makeVueComponent() refuses to instantiate a Vue component whose class does not exist (class_exists check) and reports the exact class string that failed. The string comes from your registerVueComponent() calls or from another component's getDependencies() list, so a single typo'd or non-autoloadable name stops the whole backend page render.

Source

Thrown at modules/backend/traits/VueMaker.php:212

    {
        $basePath = base_path();

        if (str_starts_with($path, $basePath)) {
            $path = substr($path, strlen($basePath));
        }

        $path = str_replace('\\', '/', $path);

        return Request::getBasePath() . '/' . ltrim($path, '/');
    }

    /**
     * makeVueComponent
     */
    protected function makeVueComponent($className)
    {
        if (!class_exists($className)) {
            throw new SystemException(sprintf('Vue component class not found: %s', $className));
        }

        if (!is_subclass_of($className, VueComponentBase::class)) {
            throw new SystemException(
                sprintf('Vue component class must be a descendant of Backend\Classes\VueComponentBase: %s', $className)
            );
        }

        return new $className($this);
    }

    /**
     * isVueComponentRegistered
     */
    protected function isVueComponentRegistered($className)
    {
        return isset($this->vueComponentClasses[$className]);
    }

View on GitHub (pinned to b608633a7e)

Solutions

  1. Read the exact class string from the error message and fix the typo or missing namespace segment.
  2. Import the class and use Name::class instead of a hand-typed string literal.
  3. Run composer dump-autoload (and clear the app cache) after adding or moving classes.
  4. Verify every name returned by getDependencies() references a real, autoloadable class.

Example fix

// before
$this->registerVueComponent(MediaManager::class); // MediaManager not imported

// after
use Acme\Demo\VueComponents\MediaManager;

$this->registerVueComponent(MediaManager::class);
Defensive patterns

Strategy: validation

Validate before calling

foreach ($vueComponents as $class) {
    if (!class_exists($class)) {
        Log::warning('Vue component class missing, skipping', ['class' => $class]);
        continue;
    }
    $this->registerVueComponent($class);
}

Type guard

function isRegistrableVueComponent(string $class): bool
{
    return class_exists($class)
        && is_subclass_of($class, \Backend\Classes\VueComponentBase::class);
}

Prevention

When it happens

Trigger: $this->registerVueComponent('Backend\VueComponents\TypoName'), or a dependency name returned by getDependencies() that matches no loaded class; composer autoload stale after the class was added or moved.

Common situations: Missing `use` import so a short class name resolves without its namespace; wrong namespace segment after moving classes; case-sensitivity mismatches that work on macOS/Windows but fail on Linux; a plugin that failed to install or boot.

Related errors


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