{"record":{"id":"6d5ba56e77036ce3","repo":"cube-js/cube","slug":"dashboard-app-not-found-in-path-resolve-options","errorCode":null,"errorMessage":"Dashboard app not found in '${path.resolve(options.dashboardAppPath)}' directory","messagePattern":"Dashboard app not found in '(.+?)' directory","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"packages/cubejs-server-core/src/core/DevServer.ts","lineNumber":250,"sourceCode":"\n      if (lastApplyTemplatePackagesError) {\n        const toThrow = lastApplyTemplatePackagesError;\n        lastApplyTemplatePackagesError = null;\n        throw toThrow;\n      }\n\n      if (this.applyTemplatePackagesPromise) {\n        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      });","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-server-core/src/core/DevServer.ts#L232-L268","documentation":"initDevEnv (packages/cubejs-server-core/src/core/DevServer.ts:250) serves the dashboard app from options.dashboardAppPath. If that directory does not exist or is empty (common with docker-compose mounting an empty volume), it responds 404 'Dashboard app not found in ...' because template generation did not produce the app.","triggerScenarios":"Requesting the dashboard app when options.dashboardAppPath is missing or readdirSync returns zero entries — i.e. template packages were never applied or the directory was wiped.","commonSituations":"docker-compose mounting a host volume over /dashboard-app (empty host dir shadows generated app); dashboard-app generation failed earlier (npm install errors) leaving the dir empty; read-only filesystems preventing generation.","solutions":["Remove the empty/incorrect volume mount for /dashboard-app (or the dashboardAppPath option) so Cube can generate it","Delete the stale directory and restart the dev server to regenerate the dashboard app","Fix any earlier template-package install errors visible in startup logs (network, npm registry)","Ensure the process has write permission to the project directory"],"exampleFix":"# before (docker-compose.yml)\nvolumes:\n  - ./dashboard-app:/cube/conf/dashboard-app\n# after\nvolumes: []","handlingStrategy":"validation","validationCode":"const fs = require('fs-extra');\nif (!fs.pathExistsSync('./dashboard-app') || fs.readdirSync('./dashboard-app').length === 0) {\n  console.warn('dashboard-app missing/empty; restart dev server without mounting a volume over it');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not mount host volumes over /dashboard-app in docker-compose","Check startup logs for template-package install failures that leave the directory empty","Ensure the project directory is writable by the Cube process"],"tags":["dev-server","playground","docker","http-404"],"backgroundTag":"dashboard-app-missing","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}