{"record":{"id":"d32e693f2cb2376e","repo":"davila7/claude-code-templates","slug":"sandbox-interface-not-found-the-sandbox-interfac","errorCode":null,"errorMessage":"Sandbox Interface Not Found - The sandbox-interface.html file could not be be found. Tried paths: ${localPath} ${docsPath}","messagePattern":"Sandbox Interface Not Found - The sandbox-interface\\.html file could not be be found\\. Tried paths: (.+?) (.+?)","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"cli-tool/src/sandbox-server.js","lineNumber":101,"sourceCode":"// JSON parsing middleware\napp.use(express.json());\n\n// Store active tasks\nconst activeTasks = new Map();\n\n// Serve the sandbox interface at root\napp.get('/', (req, res) => {\n    // Try local file first (when running from npm package)\n    const localPath = path.join(__dirname, 'sandbox-interface.html');\n    // Fallback to docs folder (when running from source)\n    const docsPath = path.join(__dirname, '../../docs/sandbox-interface.html');\n    \n    if (fs.existsSync(localPath)) {\n        res.sendFile(localPath);\n    } else if (fs.existsSync(docsPath)) {\n        res.sendFile(docsPath);\n    } else {\n        res.status(404).send(`\n            <html>\n                <body style=\"font-family: system-ui; padding: 40px; background: #0f0f0f; color: #e0e0e0;\">\n                    <h1>❌ Sandbox Interface Not Found</h1>\n                    <p>The sandbox-interface.html file could not be found.</p>\n                    <p>Please reinstall the package or check your installation.</p>\n                    <pre style=\"background: #1a1a1a; padding: 10px; border-radius: 5px;\">\nTried paths:\n- ${localPath}\n- ${docsPath}\n                    </pre>\n                </body>\n            </html>\n        `);\n    }\n});\n\n// Serve static files for CSS, JS, etc. (but not index.html at root)\napp.use('/css', express.static(path.join(__dirname, '../../docs/css')));","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/davila7/claude-code-templates/blob/a0851ed10c7c60463dac8cfaaca124cf32d5804d/cli-tool/src/sandbox-server.js#L83-L119","documentation":"HTTP 404 HTML page served by the sandbox server when sandbox-interface.html exists neither at the packaged local path nor at the fallback docs path. The message lists both tried locations, which tells you exactly where the server looked.","triggerScenarios":"GET of the sandbox UI route when both fs.existsSync checks fail — the HTML file was deleted, the package installation is incomplete/broken, or the file lives elsewhere (e.g. moved in a newer version).","commonSituations":"npm install of the package partially failed or node_modules was pruned; a version upgrade relocated sandbox-interface.html; running from a bundled/frozen executable where __dirname doesn't point at the shipped assets; someone deleted the analytics/sandbox web assets to save space.","solutions":["Note the two tried paths in the error and check whether sandbox-interface.html exists anywhere in the package (find node_modules/<pkg> -name 'sandbox-interface.html')","Reinstall the package (npm install <pkg> --force or remove node_modules and reinstall) to restore missing assets","If running from a bundle, ensure __dirname resolves next to the shipped web assets or copy the file to one of the tried paths","Pin/upgrade to a version known to ship the file at one of those locations"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"null","typeGuard":null,"tryCatchPattern":"try { await openSandboxUI(); } catch (e) { if (e.status === 404) promptReinstall('sandbox assets missing — reinstall the package'); }","preventionTips":["After install, verify web assets exist next to the server file","Pin package versions known to ship the UI","If bundling, ensure static assets are included relative to __dirname"],"tags":["http-404","missing-file","installation","static-assets"],"backgroundTag":"missing-static-asset","analyzedSha":"a0851ed10c7c60463dac8cfaaca124cf32d5804d","analyzedAt":"2026-08-28T14:11:56.058Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}