{"record":{"id":"b1eb232c374539cd","repo":"davila7/claude-code-templates","slug":"docker-component-files-not-found-at-componentsd","errorCode":null,"errorMessage":"Docker component files not found at: ${componentsDir}","messagePattern":"Docker component files not found at: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli-tool/src/index.js","lineNumber":3130,"sourceCode":"    try {\n      if (await fs.pathExists(componentsDir)) {\n        console.log(chalk.gray('📦 Using local Docker component files...'));\n        console.log(chalk.dim(`   Source: ${componentsDir}`));\n        console.log(chalk.dim(`   Target: ${sandboxDir}`));\n\n        // Copy all files from docker directory\n        await fs.copy(componentsDir, sandboxDir, {\n          overwrite: true\n        });\n\n        // Verify files were copied\n        const copiedFiles = await fs.readdir(sandboxDir);\n        console.log(chalk.dim(`   Copied ${copiedFiles.length} items`));\n        if (copiedFiles.length === 0) {\n          throw new Error('No files were copied from Docker component directory');\n        }\n      } else {\n        throw new Error(`Docker component files not found at: ${componentsDir}`);\n      }\n    } catch (error) {\n      spinner.fail(`Failed to install Docker component: ${error.message}`);\n      throw error;\n    }\n\n    spinner.succeed('Docker sandbox component installed successfully');\n\n    // Check for Docker\n    const dockerSpinner = ora('Checking Docker environment...').start();\n\n    try {\n      const { spawn } = require('child_process');\n\n      // Check Docker installation\n      const checkDocker = () => {\n        return new Promise((resolve) => {\n          const check = spawn('docker', ['--version'], { stdio: 'pipe' });","sourceCodeStart":3112,"sourceCodeEnd":3148,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/index.js#L3112-L3148","documentation":"The Docker sandbox installer checks fs.pathExists on the resolved local componentsDir before copying; a missing directory throws this error. It indicates the packaged catalog references a Docker component folder that doesn't exist on disk.","triggerScenarios":"Installing a Docker sandbox component whose folder was moved/deleted while components.json still lists it, or when the npm package was published without that folder.","commonSituations":"Stale npx cache holding an old package; catalog regenerated from a branch where the component was renamed; typo in the component slug passed to --sandbox.","solutions":["Run npx claude-code-templates@latest --sandbox docker-<name> (and clear the npx cache) to get a consistent package+catalog","Confirm the folder exists in the repo and matches the catalog path, then regenerate components.json and republish if it was moved","Verify the exact slug spelling against the dashboard or components.json","As a workaround, clone the repo and run the CLI from source (node cli-tool/src/index.js) where the folder is present"],"exampleFix":"// before\nthrow new Error(`Docker component files not found at: ${componentsDir}`);\n// after\nthrow new Error(`Docker component '${componentData.name}' files not found at: ${componentsDir}. Try @latest or check the catalog path.`);","handlingStrategy":"validation","validationCode":"const ok = await fs.pathExists(componentsDir);\nif (!ok) { console.error(`Docker component missing at ${componentsDir}; check slug and update CLI`); process.exit(1); }","typeGuard":null,"tryCatchPattern":"try { /* install */ } catch (e) { if (/Docker component files not found/.test(e.message)) { /* suggest @latest, verify slug */ } throw e; }","preventionTips":["Cross-check catalog paths against the filesystem in a publish precheck","Use exact slugs from the dashboard"],"tags":["docker","sandbox","missing-file","catalog"],"backgroundTag":"component-path-not-found","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}