usebruno/bruno · error · Error
path: ${apiSpecLocation} is not an existing directory
Error message
path: ${apiSpecLocation} is not an existing directory What it means
Error "path: ${apiSpecLocation} is not an existing directory" thrown in usebruno/bruno.
Source
Thrown at packages/bruno-electron/src/ipc/apiSpec.js:41
});
ipcMain.handle('renderer:save-api-spec', async (event, pathname, content) => {
try {
await writeFile(pathname, content);
} catch (error) {
return Promise.reject(error);
}
});
ipcMain.handle('renderer:create-api-spec', async (event, apiSpecName, apiSpecLocation, content = '', workspacePath = null) => {
try {
if (typeof apiSpecName !== 'string' || apiSpecName !== path.basename(apiSpecName)) {
throw new Error(`api spec: ${apiSpecName} is not a valid filename`);
}
validateApiSpec(apiSpecName);
if (typeof apiSpecLocation !== 'string' || !isDirectory(apiSpecLocation)) {
throw new Error(`path: ${apiSpecLocation} is not an existing directory`);
}
let pathname = path.join(apiSpecLocation, apiSpecName);
if (fs.existsSync(pathname)) {
throw new Error(`path: ${pathname} already exists`);
}
await writeFile(pathname, content);
openApiSpec(mainWindow, watcher, pathname, { workspacePath });
} catch (error) {
return Promise.reject(error);
}
});
ipcMain.handle('renderer:remove-api-spec', async (event, pathname, workspacePath = null) => {
try {
if (watcher && mainWindow) {
watcher.removeWatcher(pathname, mainWindow);
removeApiSpecUid(pathname);View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Create the directory first or choose an existing directory for the API spec location.
- Check the path for typos.
When it happens
Trigger: Thrown at packages/bruno-electron/src/ipc/apiSpec.js:41 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/c3f1152b97382743.
Report an issue: GitHub.