usebruno/bruno · error · Error
collection: invalid pathname - ${dirPath}
Error message
collection: invalid pathname - ${dirPath} What it means
Error "collection: invalid pathname - ${dirPath}" thrown in usebruno/bruno.
Source
Thrown at packages/bruno-electron/src/ipc/collection.js:209
const registerRendererEventHandlers = (mainWindow, watcher) => {
// create collection
ipcMain.handle(
'renderer:create-collection',
async (event, collectionName, collectionFolderName, collectionLocation, options = {}) => {
try {
const format = options.format || DEFAULT_COLLECTION_FORMAT;
collectionFolderName = sanitizeName(collectionFolderName);
const dirPath = path.join(collectionLocation, collectionFolderName);
if (fs.existsSync(dirPath)) {
const files = fs.readdirSync(dirPath);
if (files.length > 0) {
throw new Error(`collection: ${dirPath} already exists and is not empty`);
}
}
if (!validateName(path.basename(dirPath))) {
throw new Error(`collection: invalid pathname - ${dirPath}`);
}
if (!fs.existsSync(dirPath)) {
await createDirectory(dirPath);
}
const uid = generateUidBasedOnHash(dirPath);
let brunoConfig = {
version: '1',
name: collectionName,
type: 'collection',
ignore: ['node_modules', '.git']
};
if (format === 'yml') {
const collectionRoot = {
meta: {
name: collectionNameView on GitHub (pinned to 9bdd81c7bd)
Solutions
- Provide a valid absolute path without illegal characters for the collection directory.
When it happens
Trigger: Thrown at packages/bruno-electron/src/ipc/collection.js:209 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/bfbac4790689657e.
Report an issue: GitHub.