usebruno/bruno · error · Error
Collection path does not exist
Error message
Collection path does not exist
What it means
renderer:export-collection-zip requires collectionPath to be truthy and present on disk (fs.existsSync). Unlike install-postman-packages it does not check isDirectory. Throws before opening the save dialog.
Source
Thrown at packages/bruno-electron/src/ipc/collection.js:2570
bruJsons = bruJsons.concat(currentDirBruJsons);
};
await traverse(dir);
return bruJsons;
};
const orderedFiles = await getFilesInOrder(dir);
return orderedFiles;
};
const files = await getBruFilesRecursively(collectionPath);
return { name, files, ...variables };
});
ipcMain.handle('renderer:export-collection-zip', async (event, collectionPath, collectionName) => {
try {
if (!collectionPath || !fs.existsSync(collectionPath)) {
throw new Error('Collection path does not exist');
}
const defaultFileName = `${sanitizeName(collectionName)}.zip`;
const { filePath, canceled } = await dialog.showSaveDialog(mainWindow, {
title: 'Export Collection as ZIP',
defaultPath: defaultFileName,
filters: [{ name: 'Zip Files', extensions: ['zip'] }]
});
if (canceled || !filePath) {
return { success: false, canceled: true };
}
const ignoredDirectories = ['node_modules', '.git'];
await new Promise((resolve, reject) => {
const output = fs.createWriteStream(filePath);
const archive = archiver('zip', { zlib: { level: 9 } });View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Verify collectionPath exists on disk before offering the export action.
- Re-open the collection if the directory was moved.
- Pass an absolute path resolved at click time.
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
if (!collectionPath || !fs.existsSync(collectionPath)) {
throw new Error('Collection path does not exist');
} Try / catch
try {
await ipcRenderer.invoke('renderer:export-collection-zip', collectionPath, collectionName);
} catch (err) {
if (/Collection path does not exist/.test(err.message)) {
// re-open the collection, then retry
} else {
throw err;
}
} Prevention
- Verify collectionPath at click time, not at selection time.
- Disable the export action when the collection is unmounted/closed.
When it happens
Trigger: Calling renderer:export-collection-zip with a collectionPath that is empty or no longer exists.
Common situations: Collection moved/deleted/unmounted between open and export; race during collection close; stale path cached in renderer state.
Related errors
- Export location does not exist
- path: ${filePath} already exists
- ZIP file does not exist
- Collection location does not exist
- Failed to export ${environmentType} environments.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/2e9e0b4370cde3f1.
Report an issue: GitHub.