{"record":{"id":"fd8e149e66111add","repo":"octobercms/october","slug":"vue-component-class-not-found-s","errorCode":null,"errorMessage":"Vue component class not found: %s","messagePattern":"Vue component class not found: (.+?)","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/traits/VueMaker.php","lineNumber":212,"sourceCode":"    {\n        $basePath = base_path();\n\n        if (str_starts_with($path, $basePath)) {\n            $path = substr($path, strlen($basePath));\n        }\n\n        $path = str_replace('\\\\', '/', $path);\n\n        return Request::getBasePath() . '/' . ltrim($path, '/');\n    }\n\n    /**\n     * makeVueComponent\n     */\n    protected function makeVueComponent($className)\n    {\n        if (!class_exists($className)) {\n            throw new SystemException(sprintf('Vue component class not found: %s', $className));\n        }\n\n        if (!is_subclass_of($className, VueComponentBase::class)) {\n            throw new SystemException(\n                sprintf('Vue component class must be a descendant of Backend\\Classes\\VueComponentBase: %s', $className)\n            );\n        }\n\n        return new $className($this);\n    }\n\n    /**\n     * isVueComponentRegistered\n     */\n    protected function isVueComponentRegistered($className)\n    {\n        return isset($this->vueComponentClasses[$className]);\n    }","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/traits/VueMaker.php#L194-L230","documentation":"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.","triggerScenarios":"$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.","commonSituations":"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.","solutions":["Read the exact class string from the error message and fix the typo or missing namespace segment.","Import the class and use Name::class instead of a hand-typed string literal.","Run composer dump-autoload (and clear the app cache) after adding or moving classes.","Verify every name returned by getDependencies() references a real, autoloadable class."],"exampleFix":"// before\n$this->registerVueComponent(MediaManager::class); // MediaManager not imported\n\n// after\nuse Acme\\Demo\\VueComponents\\MediaManager;\n\n$this->registerVueComponent(MediaManager::class);","handlingStrategy":"validation","validationCode":"foreach ($vueComponents as $class) {\n    if (!class_exists($class)) {\n        Log::warning('Vue component class missing, skipping', ['class' => $class]);\n        continue;\n    }\n    $this->registerVueComponent($class);\n}","typeGuard":"function isRegistrableVueComponent(string $class): bool\n{\n    return class_exists($class)\n        && is_subclass_of($class, \\Backend\\Classes\\VueComponentBase::class);\n}","tryCatchPattern":null,"preventionTips":["Use ::class constants with `use` imports instead of string literals","Run composer dump-autoload after adding or moving classes","Watch for class-name case mismatches when deploying from macOS/Windows to Linux"],"tags":["vue-component","class-not-found","autoloading","php"],"backgroundTag":"class-not-found","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}