oven-sh/bun · error · SyntaxError

Could not process input: ${line} ${spaces}^ at ${filenam

Error message

Could not process input:
${line}
${spaces}^
    at ${filename}:${lineNumber}:${columnNumber}

What it means

Error "Could not process input: ${line} ${spaces}^ at ${filename}:${lineNumber}:${columnNumber}" thrown in oven-sh/bun.

Source

Thrown at src/codegen/bundle-functions.ts:136

    if (!match) {
      const pos = originalContents.length - contents.length;
      let lineNumber = 1;
      let columnNumber = 1;
      let lineStartPos = 0;
      for (let i = 0; i < pos; i++) {
        if (originalContents[i] === "\n") {
          lineNumber++;
          columnNumber = 1;
          lineStartPos = i + 1;
        } else {
          columnNumber++;
        }
        if (i === pos) {
          break;
        }
      }
      const lineEndPos = lineStartPos + originalContents.slice(lineStartPos).indexOf("\n");
      throw new SyntaxError(
        "Could not process input:\n" +
          originalContents.slice(lineStartPos, lineEndPos) +
          "\n" +
          " ".repeat(pos - lineStartPos) +
          "^" +
          "\n    at " +
          filename +
          ":" +
          lineNumber +
          ":" +
          columnNumber,
      );
    }
    contents = contents.slice(match.index!);
    if (match[1] === "import") {
      // TODO: we may want to do stuff with these
      const i = contents.indexOf(";");
      contents = contents.slice(i + 1);

View on GitHub (pinned to 8c5296ac45)

When it happens

Trigger: Thrown at src/codegen/bundle-functions.ts:136 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/602c5d3cd493bdb8. Report an issue: GitHub.