{"record":{"id":"7863117fc7ccd8eb","repo":"usebruno/bruno","slug":"migration-aborted-target-yml-file-s-already-exi","errorCode":null,"errorMessage":"Migration aborted — target yml file(s) already exist:\n${collisions.join('\\n')}","messagePattern":"Migration aborted — target yml file\\(s\\) already exist:\n(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/yml-migration.js","lineNumber":151,"sourceCode":"          throw parseError;\n        }\n        parseErrors.push(`${bruFilePath}: ${parseError.message}`);\n      }\n      emitProgress('parsing', i + 1, bruFiles.length);\n    }\n\n    if (parseErrors.length > 0) {\n      throw new Error(`Migration aborted — ${parseErrors.length} file(s) failed to parse:\\n${parseErrors.join('\\n')}`);\n    }\n\n    const collisions = conversionPlan\n      .map(({ ymlPath }) => ymlPath)\n      .filter((ymlPath) => fs.existsSync(ymlPath));\n    if (fs.existsSync(ocYmlPath)) {\n      collisions.push(ocYmlPath);\n    }\n    if (collisions.length > 0) {\n      throw new Error(`Migration aborted — target yml file(s) already exist:\\n${collisions.join('\\n')}`);\n    }\n\n    // Phase 2: write the converted yml files\n    const totalWrites = conversionPlan.length + 1;\n    for (let i = 0; i < conversionPlan.length; i++) {\n      checkCancelled();\n      const { ymlPath, ymlContent } = conversionPlan[i];\n      await writeFile(ymlPath, ymlContent);\n      writtenYmlFiles.push(ymlPath);\n      emitProgress('writing', i + 1, totalWrites);\n    }\n    checkCancelled();\n    await writeFile(ocYmlPath, ymlCollectionContent);\n    writtenYmlFiles.push(ocYmlPath);\n    emitProgress('writing', totalWrites, totalWrites);\n\n    // Phase 3: back up the bru sources, then remove them\n    const originalsToRemove = [...bruFiles, brunoJsonPath];","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/yml-migration.js#L133-L169","documentation":"Error \"Migration aborted — target yml file(s) already exist:\n${collisions.join('\\n')}\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/yml-migration.js:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or rename the listed existing yml files, then re-run the migration.","Back up and clean the target files before retrying."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}