usebruno/bruno · error · Error

Workspace path does not exist

Error message

Workspace path does not exist: ${workspacePath}

What it means

`validateWorkspacePath` checks `fs.existsSync(workspacePath)` after the non-empty check and throws when the directory is absent on disk. The path was supplied but the OS reports it does not exist.

Solutions

  1. Confirm the folder still exists at the recorded path (`ls` / Explorer).
  2. If moved, re-open the workspace from its new location and update the stored record.
  3. Check for drive mounts / network shares before launching Bruno.
  4. Inspect the stored workspace path for stale home-directory or separator issues.

Example fix

// before
validateWorkspacePath('/home/user/OldWorkspace');  // folder was moved

// after
validateWorkspacePath('/home/user/Workspace');   // current location
Defensive patterns

Strategy: validation

Validate before calling

const fs = require('fs');
function ensureWorkspaceExists(p) {
  if (!p) throw new Error('Workspace path is required');
  if (!fs.existsSync(p)) throw new Error(`Workspace missing on disk: ${p}`);
  return p;
}

Try / catch

try { validateWorkspacePath(wsPath); }
catch (e) { if (/does not exist/.test(e.message)) { /* re-pick workspace */ } else throw e; }

Prevention

When it happens

Trigger: Caller hands a string path that resolves to nothing — moved/renamed workspace folder, deleted directory, network drive unmounted, or a path string assembled incorrectly.

Common situations: User moved the workspace folder on disk while Bruno still points at the old location; an external sync tool removed it; the path was built with a wrong separator or stale home dir; removable storage ejected.

Related errors


AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13). Data as JSON: /api/errors/38d2a0fe63d4f385. Report an issue: GitHub.

Appendix: source

Thrown at packages/bruno-electron/src/utils/workspace-config.js:173

  const normalizedCollection = {
    name: collection.name,
    path: relativePath
  };

  if (collection.remote) {
    normalizedCollection.remote = collection.remote;
  }

  return normalizedCollection;
};

const validateWorkspacePath = (workspacePath) => {
  if (!workspacePath) {
    throw new Error('Workspace path is required');
  }

  if (!fs.existsSync(workspacePath)) {
    throw new Error(`Workspace path does not exist: ${workspacePath}`);
  }

  const workspaceFilePath = path.join(workspacePath, 'workspace.yml');
  if (!fs.existsSync(workspaceFilePath)) {
    throw new Error('Invalid workspace: workspace.yml not found');
  }

  return true;
};

const validateWorkspaceDirectory = (dirPath) => {
  if (!validateName(path.basename(dirPath))) {
    throw new Error(`Invalid workspace directory name: ${dirPath}`);
  }
  return true;
};

const createWorkspaceConfig = (workspaceName) => ({

View on GitHub (pinned to 9bdd81c7bd)