usebruno/bruno · error · Error

File does not exist

Error message

File does not exist: ${source}

What it means

Error "File does not exist: ${source}" thrown in usebruno/bruno.

Solutions

  1. Check the file path for typos and that the file exists.
  2. Use an absolute path to the collection file.

When it happens

Trigger: Thrown at packages/bruno-cli/src/commands/import.js:128 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/9ddbf638c449b38d. Report an issue: GitHub.

Appendix: source

Thrown at packages/bruno-cli/src/commands/import.js:128

          || error.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
          throw new Error(`SSL Certificate error: ${error.code}. Try using --insecure if you trust this source.`);
        } else if (error.response) {
          throw new Error(`Failed to fetch from URL: ${error.response.status} ${error.response.statusText}`);
        } else if (error.request) {
          throw new Error(`No response received from server. Check the URL and your network connection.`);
        } else {
          throw new Error(`Error fetching URL: ${error.message}`);
        }
      }

      // If response is already an object, return it directly
      if (typeof content === 'object' && content !== null) {
        return content;
      }
    } else {
      // Handle file input
      if (!await exists(source)) {
        throw new Error(`File does not exist: ${source}`);
      }
      content = fs.readFileSync(source, 'utf8');
    }

    // If content is a string, try to parse as JSON or YAML
    if (typeof content === 'string') {
      try {
        return JSON.parse(content);
      } catch (jsonError) {
        try {
          return jsyaml.load(content);
        } catch (yamlError) {
          throw new Error('Failed to parse content as JSON or YAML');
        }
      }
    }

    return content;

View on GitHub (pinned to 9bdd81c7bd)