usebruno/bruno · error · Error
Collection path does not exist: ${collectionPathname}
Error message
Collection path does not exist: ${collectionPathname} What it means
renderer:install-postman-packages verifies collectionPathname both exists (fs.existsSync) and is a directory (fs.statSync().isDirectory()). Thrown when the path is missing, points to a file, or has been removed.
Source
Thrown at packages/bruno-electron/src/ipc/collection.js:2445
preserveScripts: !!options.preserveScripts
});
return result;
} catch (error) {
console.error('Error converting Postman to Bruno:', error);
return Promise.reject(error);
}
});
ipcMain.handle('renderer:install-postman-packages', async (_event, collectionPathname, packages) => {
if (typeof collectionPathname !== 'string' || !collectionPathname) {
throw new Error('collectionPathname is required');
}
if (!Array.isArray(packages) || packages.length === 0) {
throw new Error('packages must be a non-empty array');
}
if (!fs.existsSync(collectionPathname) || !fs.statSync(collectionPathname).isDirectory()) {
throw new Error(`Collection path does not exist: ${collectionPathname}`);
}
const invalid = packages.filter((p) => !isValidNpmPackageName(p));
if (invalid.length > 0) {
throw new Error(`Invalid package name(s): ${invalid.join(', ')}`);
}
await waitForShellEnv();
return runNpmInstall({ collectionPath: collectionPathname, packages });
});
ipcMain.handle('renderer:get-collection-json', async (event, collectionPath) => {
let variables = {};
let name = '';
const getBruFilesRecursively = async (dir) => {
const getFilesInOrder = async (dir) => {
let bruJsons = [];
View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Pass the collection's directory path (the folder containing bruno.json), not a file.
- Re-open the collection if it has been moved.
- Verify the path with fs.statSync before invoking.
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
const stats = fs.statSync(collectionPathname);
if (!stats.isDirectory()) {
throw new Error(`Expected a directory but got: ${collectionPathname}`);
} Try / catch
try {
await ipcRenderer.invoke('renderer:install-postman-packages', collectionPathname, packages);
} catch (err) {
if (/Collection path does not exist/.test(err.message)) {
// re-open the collection or re-prompt
} else {
throw err;
}
} Prevention
- Pass the collection directory (folder containing bruno.json), never the file itself.
- Verify the path with fs.statSync just before invoking.
When it happens
Trigger: Calling renderer:install-postman-packages with a path that does not exist on disk or names a file rather than a directory.
Common situations: Collection moved/deleted between session start and the install call; path points at bruno.json (the file) rather than its parent dir; removable media unmounted.
Related errors
- packages must be a non-empty array
- Invalid package name(s): ${invalid.join(', ')}
- Export location does not exist
- path: ${filePath} already exists
- ${request.filename} is not a valid filename
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/2e717a540948dd53.
Report an issue: GitHub.