usebruno/bruno · error · Error
Workspace path does not exist: ${workspacePath}
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.
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)
Solutions
- Confirm the folder still exists at the recorded path (`ls` / Explorer).
- If moved, re-open the workspace from its new location and update the stored record.
- Check for drive mounts / network shares before launching Bruno.
- 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
- Check existence before each long-running operation; folders can move.
- Persist the last-used workspace and verify on startup.
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
- Invalid workspace: workspace.yml not found
- Workspace path is required
- The collection is not valid (neither bruno.json nor opencoll
- ${filename} file does not exist
- Export path: ${filePath} is not an existing directory
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/38d2a0fe63d4f385.
Report an issue: GitHub.