cube-js/cube · error

Dashboard app corrupted. Please remove '${path.resolve(optio

Error message

Dashboard app corrupted. Please remove '${path.resolve(options.dashboardAppPath)}' directory and recreate it

What it means

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.

Source

Thrown at packages/cubejs-server-core/src/core/DevServer.ts:258

        if (req.query.instant) {
          res.status(404).json({ error: 'Dashboard app creating' });
          return;
        }

        await this.applyTemplatePackagesPromise;
      }

      // docker-compose share a volume for /dashboard-app and directory will be empty
      if (!fs.pathExistsSync(options.dashboardAppPath) || fs.readdirSync(options.dashboardAppPath).length === 0) {
        res.status(404).json({
          error: `Dashboard app not found in '${path.resolve(options.dashboardAppPath)}' directory`
        });

        return;
      }

      if (!fs.pathExistsSync(sourcePath)) {
        res.status(404).json({
          error: `Dashboard app corrupted. Please remove '${path.resolve(options.dashboardAppPath)}' directory and recreate it`
        });

        return;
      }

      res.json({
        status: 'created',
        installedTemplates: AppContainer.getPackageVersions(options.dashboardAppPath)
      });
    }));

    app.get('/playground/start-dashboard-app', catchErrors(async (req, res) => {
      this.cubejsServer.event('Dev Server Start Dashboard App');

      if (!this.dashboardAppProcess) {
        const { dashboardAppPort = 3000 } = options;
        this.dashboardAppProcess = spawn('npm', [

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Delete the dashboard-app directory entirely and restart the dev server to regenerate it from templates
  2. Restore the deleted src/index.js / required entry files if you want to keep local modifications
  3. Exclude dashboard-app from volumes/version control that can desync or strip files
  4. Re-run template package application by clearing any caching that skips regeneration

Example fix

# regenerate the dashboard app
rm -rf ./dashboard-app && npm run dev
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs-extra');
if (fs.pathExistsSync('./dashboard-app') && !fs.pathExistsSync('./dashboard-app/src/index.js')) {
  console.warn('dashboard-app corrupted — delete it and restart the dev server');
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/98e3158c971e4813. Report an issue: GitHub.