wavetermdev/waveterm · error

electron executable path not set

Error message

electron executable path not set

What it means

Before building, the controller fetches the Electron executable path via wavebase.GetWaveAppElectronExecPath() and requires it to be non-empty, since the Tsunami build uses the Electron node binary. This literal error is thrown when the path was never set (empty string), meaning the app is running outside a properly initialized Wave shell/electron environment.

Source

Thrown at pkg/buildercontroller/buildercontroller.go:214

		bc.handleBuildError(fmt.Errorf("failed to parse app id: %w", err), resultCh)
		return
	}

	appPath, err := waveappstore.GetAppDir(appId)
	if err != nil {
		bc.handleBuildError(fmt.Errorf("failed to get app directory: %w", err), resultCh)
		return
	}

	cachePath, err := GetBuilderAppExecutablePath(appPath)
	if err != nil {
		bc.handleBuildError(fmt.Errorf("failed to get builder executable path: %w", err), resultCh)
		return
	}

	nodePath := wavebase.GetWaveAppElectronExecPath()
	if nodePath == "" {
		bc.handleBuildError(fmt.Errorf("electron executable path not set"), resultCh)
		return
	}

	scaffoldPath := waveapputil.GetTsunamiScaffoldPath()
	settings := wconfig.GetWatcher().GetFullConfig().Settings
	sdkReplacePath := settings.TsunamiSdkReplacePath
	sdkVersion := settings.TsunamiSdkVersion
	if sdkVersion == "" {
		sdkVersion = waveapputil.DefaultTsunamiSdkVersion
	}
	goPath := settings.TsunamiGoPath

	outputCapture := build.MakeOutputCapture()
	_, err = build.TsunamiBuildInternal(build.BuildOpts{
		AppPath:        appPath,
		AppNS:          appNS,
		Verbose:        true,
		Open:           false,

View on GitHub (pinned to a4447c1563)

Solutions

  1. Launch wave through the normal electron bootstrap so GetWaveAppElectronExecPath is populated
  2. Check startup code that sets the electron exec path and why it did not run
  3. Verify the installed wave binary ships/locates the electron executable for the current OS
  4. Set the appropriate wave base path override in the environment before starting
Defensive patterns

Strategy: validation

Validate before calling

if wavebase.GetWaveAppElectronExecPath() == "" {
    return fmt.Errorf("cannot build: electron exec path not initialized")
}

Try / catch

if err := runBuild(appId); err != nil {
    if strings.Contains(err.Error(), "electron executable path not set") { /* re-init environment */ }
}

Prevention

When it happens

Trigger: GetWaveAppElectronExecPath() returns "" — the electron executable path global was never populated at startup, or wave is running in a context (headless/dev) where the electron binary path was not registered.

Common situations: Running the builder from a dev/test harness without the full electron bootstrap; packaging issue where the electron binary was not located at launch; WAVE override paths pointing at missing binaries.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/4683d125f33af15e. Report an issue: GitHub.