usebruno/bruno · error · Error

bruno.json not found

Error message

bruno.json not found

What it means

Error "bruno.json not found" thrown in usebruno/bruno.

Source

Thrown at packages/bruno-electron/src/ipc/openapi-sync.js:265

 */
const loadBrunoConfig = (collectionPath) => {
  const format = getCollectionFormat(collectionPath);
  let brunoConfig;
  let collectionRoot;

  if (format === 'yml') {
    const configFilePath = path.join(collectionPath, 'opencollection.yml');
    if (!fs.existsSync(configFilePath)) {
      throw new Error('opencollection.yml not found');
    }
    const content = fs.readFileSync(configFilePath, 'utf8');
    const parsed = parseCollection(content, { format });
    brunoConfig = parsed.brunoConfig;
    collectionRoot = parsed.collectionRoot;
  } else {
    const brunoJsonPath = path.join(collectionPath, 'bruno.json');
    if (!fs.existsSync(brunoJsonPath)) {
      throw new Error('bruno.json not found');
    }
    brunoConfig = JSON.parse(fs.readFileSync(brunoJsonPath, 'utf8'));
  }

  // Resolve relative openapi sourceUrls to absolute so all callers get consistent paths
  if (Array.isArray(brunoConfig?.openapi)) {
    brunoConfig.openapi = brunoConfig.openapi.map((entry) => ({
      ...entry,
      sourceUrl: resolveSourceUrl(collectionPath, entry.sourceUrl)
    }));
  }

  return { format, brunoConfig, collectionRoot };
};

/**
 * Save bruno config to disk (bruno.json or opencollection.yml).
 */

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Ensure the directory is a valid Bruno collection containing bruno.json.
  2. Regenerate bruno.json by opening/saving the collection in Bruno.

When it happens

Trigger: Thrown at packages/bruno-electron/src/ipc/openapi-sync.js:265 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/012c23c239a1d47e. Report an issue: GitHub.