denoland/deno · error · Error

Either `node` or `range` must be provided when reporting an

Error message

Either `node` or `range` must be provided when reporting an error

What it means

macOS variant of the dev-dir lookup: LAUFEY_DEV_DIR is set, so the `.app` bundle is resolved from the local laufey checkout, but no `.app` bundle for the backend could be located under it.

Source

Thrown at cli/js/40_lint.js:386

    this.filename = fileName;
    this.sourceCode = new SourceCode(ctx);
  }

  getFilename() {
    return this.filename;
  }

  getSourceCode() {
    return this.sourceCode;
  }

  /**
   * @param {Deno.lint.ReportData} data
   */
  report(data) {
    const range = data.node ? data.node.range : data.range ? data.range : null;
    if (range == null) {
      throw new Error(
        "Either `node` or `range` must be provided when reporting an error",
      );
    }

    const start = range[0];
    const end = range[1];

    if (start > end) {
      throw new RangeError(
        `Invalid range. Start value is bigger than end value: [${start}, ${end}]`,
      );
    }

    /** @type {Deno.lint.Fix[]} */
    const fixes = [];

    if (typeof data.fix === "function") {
      const fixer = new Fixer();

View on GitHub (pinned to 89f33cbef2)

Solutions

  1. Produce the `.app` bundle in the checkout (run laufey's packaging/bundle step) and re-run
  2. Verify the expected `.app` path exists under the checkout before launching
  3. If dev mode was unintended, unset LAUFEY_DEV_DIR to use the cached/fresh download
Defensive patterns

Strategy: validation

Validate before calling

const devDir = Deno.env.get('LAUFEY_DEV_DIR');
if (devDir && !await exists(`${devDir}/target/release/laufey.app`)) {
  throw new Error('LAUFEY_DEV_DIR set but no built .app — run laufey\'s packaging step first');
}

Prevention

When it happens

Trigger: LAUFEY_DEV_DIR pointing at a checkout that was built as plain binaries but whose macOS `.app` bundle was never produced, or was produced in a non-default location.

Common situations: Building laufey with `cargo build` only (no bundling step); stale clone missing the packaging output.

Related errors


AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16). Data as JSON: /api/errors/dd37f7109a3a1c8b. Report an issue: GitHub.