denoland/deno · error

LAUFEY backend executable not found at '{}'

Error message

LAUFEY backend executable not found at '{}'

What it means

During macOS bundle assembly, the tool resolves the cached laufey .app for the chosen backend (default "webview"), reads CFBundleExecutable from its Info.plist (falling back to laufey_webview), and expects that binary under Contents/MacOS/. Its absence means the laufey bundle on disk is incomplete or has an unexpected layout — most often a corrupted/partial cache.

Source

Thrown at cli/tools/desktop.rs:3203

  // (the same guard the removed shell launcher applied) instead of emitting a
  // malformed plist that silently fails to launch.
  validate_launcher_name(&app_name, "app name")?;
  let app_bundle = parts.parent.join(format!("{}.app", app_name));

  // Find the LAUFEY backend .app and its main executable.
  let backend = desktop_flags.backend.as_deref().unwrap_or("webview");
  let target = laufey_target_for(desktop_flags);
  let laufey_app = laufey_resolver.find_app_bundle(backend, target).await?;
  let laufey_executable_name = read_plist_string(
    &laufey_app.join("Contents/Info.plist"),
    "CFBundleExecutable",
  )
  .unwrap_or_else(|| "laufey_webview".to_string());
  let laufey_binary = laufey_app
    .join("Contents/MacOS")
    .join(&laufey_executable_name);
  if !laufey_binary.exists() {
    bail!(
      "LAUFEY backend executable not found at '{}'",
      laufey_binary.display()
    );
  }

  // Remove an existing bundle we previously built; never delete unrelated
  // user data that collided with the inferred `<name>.app` (issue #35510).
  reserve_app_dir(&app_bundle)?;

  // Copy the entire LAUFEY .app as the shell (CEF needs Frameworks/, Resources/, etc.).
  crate::tools::compile::copy_dir_all(&laufey_app, &app_bundle)?;

  let contents_dir = app_bundle.join("Contents");
  let macos_dir = contents_dir.join("MacOS");
  let resources_dir = contents_dir.join("Resources");
  std::fs::create_dir_all(&resources_dir)?;
  // Marker lives under Resources/ (not the bundle root) so it is sealed as a
  // normal resource when the bundle is codesigned below.

View on GitHub (pinned to f7822238ca)

Solutions

  1. Inspect the printed path: list `<laufey.app>/Contents/MacOS/` to see what actually exists.
  2. Delete the cached laufey bundle (the directory containing the .app named in the error) so the next run re-downloads it intact.
  3. Verify the desktop backend flag value is one the resolver actually has a bundle for (default is "webview").
  4. Check disk space and re-run once the environment is stable.
Defensive patterns

Strategy: validation

Validate before calling

# After a failed/suspect first run, verify the cached bundle is complete
APP="$(dirname "$(find "$HOME" -path '*laufey*.app/Contents/Info.plist' 2>/dev/null | head -1)")"
[ -n "$APP" ] && ls "$APP/Contents/MacOS/" || echo "laufey bundle incomplete — delete its cache dir and re-run"

Try / catch

deno desktop ... || {
  echo "If the error is a missing laufey executable, clear the laufey cache and retry once:";
  echo "  rm -rf <laufey-cache-dir>  # path prefix shown in the error message";
  exit 1;
}

Prevention

When it happens

Trigger: The laufey bundle download was interrupted (first run killed, network drop, disk full), or the bundle's Info.plist names an executable that isn't in Contents/MacOS/. Printed path shows exactly where the binary was expected.

Common situations: Killed first run leaving a half-populated cache; switching laufey versions where the on-disk bundle is from an incompatible release; disk-full during download; overzealous cleanup tools deleting inside the cache.

Related errors


AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20). Data as JSON: /api/errors/ad578463f1fd5ac8. Report an issue: GitHub.