{"record":{"id":"4708538f85e6b38b","repo":"octobercms/october","slug":"a-theme-already-exists-at-themefolder-please","errorCode":null,"errorMessage":"A theme already exists at '{$themeFolder}' please rename this folder and try again.","messagePattern":"A theme already exists at '(.+?)' please rename this folder and try again\\.","errorType":"console","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"modules/cms/console/ThemeInstall.php","lineNumber":104,"sourceCode":"        passthru('\"'.PHP_BINARY.'\" artisan plugin:check');\n\n        $this->output->success(\"Theme '{$name}' installed\");\n    }\n\n    /**\n     * assertCanInstallTheme makes sure the theme isn't in use\n     */\n    protected function assertCanInstallTheme()\n    {\n        $name = strtolower($this->argument('name'));\n\n        $parts = explode('.', $name);\n        $themeFolder = $parts[1] ?? null;\n        $themePath = themes_path($themeFolder);\n\n        // Ensure a theme does not already exist\n        if ($themeFolder && file_exists($themePath)) {\n            throw new Exception(\"A theme already exists at '{$themeFolder}' please rename this folder and try again.\");\n        }\n    }\n\n    /**\n     * performLockOnTheme locks the theme and creates a child theme\n     */\n    protected function performLockOnTheme()\n    {\n        $name = strtolower($this->argument('name'));\n\n        // Legacy composer installers\n        $parts = explode('.', $name);\n        $themeFolder = $parts[1] ?? null;\n        $themePath = $themeFolder ? themes_path($themeFolder) : null;\n\n        // New composer installers\n        if (!$themePath || !file_exists($themePath)) {\n            $themeFolder = strtolower(str_replace('.', '-', $name));","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/console/ThemeInstall.php#L86-L122","documentation":"Error \"A theme already exists at '{$themeFolder}' please rename this folder and try again.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/console/ThemeInstall.php:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}