usebruno/bruno · warning · Error
collectionPathname is required
Error message
collectionPathname is required
What it means
renderer:install-postman-packages validates that collectionPathname is a non-empty string before proceeding. Throws synchronously outside any try/catch so it rejects the IPC immediately.
Source
Thrown at packages/bruno-electron/src/ipc/collection.js:2439
try {
// Convert Postman collection to Bruno format
// Returns { collection, issues } where issues tracks items that were skipped or degraded
const result = await postmanToBruno(postmanCollection, {
useWorkers: true,
// preserve scripts without any pm.* -> bru.* translation
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) => {View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Pass the absolute path to the collection directory as the first positional argument.
- Verify the IPC invocation signature matches (collectionPathname, packages).
- Guard the renderer-side call with a truthy check on the collection path.
Defensive patterns
Strategy: validation
Validate before calling
if (typeof collectionPathname !== 'string' || collectionPathname.length === 0) {
throw new Error('collectionPathname is required');
} Type guard
/** @param {unknown} p @returns {p is string} */
function isNonEmptyString(p) {
return typeof p === 'string' && p.length > 0;
} Prevention
- Forward the collection's root directory path from the renderer state.
- Match IPC positional argument order exactly (collectionPathname, packages).
When it happens
Trigger: Calling renderer:install-postman-packages with collectionPathname omitted, empty, or non-string.
Common situations: Renderer forgets to pass the collection root path; conversion flow produced an empty collection context; argument ordering bug (positional IPC args shifted).
Related errors
- packages must be a non-empty array
- Collection path does not exist: ${collectionPathname}
- Invalid package name(s): ${invalid.join(', ')}
- Export location does not exist
- Invalid file name
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/2557d8320f842ed3.
Report an issue: GitHub.