{"record":{"id":"2e717a540948dd53","repo":"usebruno/bruno","slug":"collection-path-does-not-exist-collectionpathna","errorCode":null,"errorMessage":"Collection path does not exist: ${collectionPathname}","messagePattern":"Collection path does not exist: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/collection.js","lineNumber":2445,"sourceCode":"        preserveScripts: !!options.preserveScripts\n      });\n\n      return result;\n    } catch (error) {\n      console.error('Error converting Postman to Bruno:', error);\n      return Promise.reject(error);\n    }\n  });\n\n  ipcMain.handle('renderer:install-postman-packages', async (_event, collectionPathname, packages) => {\n    if (typeof collectionPathname !== 'string' || !collectionPathname) {\n      throw new Error('collectionPathname is required');\n    }\n    if (!Array.isArray(packages) || packages.length === 0) {\n      throw new Error('packages must be a non-empty array');\n    }\n    if (!fs.existsSync(collectionPathname) || !fs.statSync(collectionPathname).isDirectory()) {\n      throw new Error(`Collection path does not exist: ${collectionPathname}`);\n    }\n\n    const invalid = packages.filter((p) => !isValidNpmPackageName(p));\n    if (invalid.length > 0) {\n      throw new Error(`Invalid package name(s): ${invalid.join(', ')}`);\n    }\n\n    await waitForShellEnv();\n    return runNpmInstall({ collectionPath: collectionPathname, packages });\n  });\n\n  ipcMain.handle('renderer:get-collection-json', async (event, collectionPath) => {\n    let variables = {};\n    let name = '';\n    const getBruFilesRecursively = async (dir) => {\n      const getFilesInOrder = async (dir) => {\n        let bruJsons = [];\n","sourceCodeStart":2427,"sourceCodeEnd":2463,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/collection.js#L2427-L2463","documentation":"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.","triggerScenarios":"Calling renderer:install-postman-packages with a path that does not exist on disk or names a file rather than a directory.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst stats = fs.statSync(collectionPathname);\nif (!stats.isDirectory()) {\n  throw new Error(`Expected a directory but got: ${collectionPathname}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await ipcRenderer.invoke('renderer:install-postman-packages', collectionPathname, packages);\n} catch (err) {\n  if (/Collection path does not exist/.test(err.message)) {\n    // re-open the collection or re-prompt\n  } else {\n    throw err;\n  }\n}","preventionTips":["Pass the collection directory (folder containing bruno.json), never the file itself.","Verify the path with fs.statSync just before invoking."],"tags":["ipc","postman","npm","filesystem","validation"],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}