{"record":{"id":"98e3158c971e4813","repo":"cube-js/cube","slug":"dashboard-app-corrupted-please-remove-path-res","errorCode":null,"errorMessage":"Dashboard app corrupted. Please remove '${path.resolve(options.dashboardAppPath)}' directory and recreate it","messagePattern":"Dashboard app corrupted\\. Please remove '(.+?)' directory and recreate it","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"packages/cubejs-server-core/src/core/DevServer.ts","lineNumber":258,"sourceCode":"        if (req.query.instant) {\n          res.status(404).json({ error: 'Dashboard app creating' });\n          return;\n        }\n\n        await this.applyTemplatePackagesPromise;\n      }\n\n      // docker-compose share a volume for /dashboard-app and directory will be empty\n      if (!fs.pathExistsSync(options.dashboardAppPath) || fs.readdirSync(options.dashboardAppPath).length === 0) {\n        res.status(404).json({\n          error: `Dashboard app not found in '${path.resolve(options.dashboardAppPath)}' directory`\n        });\n\n        return;\n      }\n\n      if (!fs.pathExistsSync(sourcePath)) {\n        res.status(404).json({\n          error: `Dashboard app corrupted. Please remove '${path.resolve(options.dashboardAppPath)}' directory and recreate it`\n        });\n\n        return;\n      }\n\n      res.json({\n        status: 'created',\n        installedTemplates: AppContainer.getPackageVersions(options.dashboardAppPath)\n      });\n    }));\n\n    app.get('/playground/start-dashboard-app', catchErrors(async (req, res) => {\n      this.cubejsServer.event('Dev Server Start Dashboard App');\n\n      if (!this.dashboardAppProcess) {\n        const { dashboardAppPort = 3000 } = options;\n        this.dashboardAppProcess = spawn('npm', [","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-server-core/src/core/DevServer.ts#L240-L276","documentation":"initDevEnv (packages/cubejs-server-core/src/core/DevServer.ts:258): after confirming dashboardAppPath exists and is non-empty, it checks for the expected source entry (sourcePath, e.g. the app's index/src directory). If missing, it responds 404 'Dashboard app corrupted...' because the directory exists but lacks the generated app structure.","triggerScenarios":"dashboardAppPath exists with some content but the required sourcePath (src/index.js entry of the generated dashboard app) is absent — partial generation, manual edits/deletions, or a partially-synced volume.","commonSituations":"Manually deleting files inside dashboard-app while keeping the folder; interrupted template generation; Docker volume sync issues where only some files were copied; checking out a project where dashboard-app was half-committed.","solutions":["Delete the dashboard-app directory entirely and restart the dev server to regenerate it from templates","Restore the deleted src/index.js / required entry files if you want to keep local modifications","Exclude dashboard-app from volumes/version control that can desync or strip files","Re-run template package application by clearing any caching that skips regeneration"],"exampleFix":"# regenerate the dashboard app\nrm -rf ./dashboard-app && npm run dev","handlingStrategy":"validation","validationCode":"const fs = require('fs-extra');\nif (fs.pathExistsSync('./dashboard-app') && !fs.pathExistsSync('./dashboard-app/src/index.js')) {\n  console.warn('dashboard-app corrupted — delete it and restart the dev server');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit or partially delete files inside the generated dashboard-app","Regenerate (rm -rf dashboard-app && restart) instead of patching a broken app","Exclude dashboard-app from version control/volumes that can desync its files"],"tags":["dev-server","playground","corrupted-state","http-404"],"backgroundTag":"dashboard-app-corrupted","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}