ruvnet/ruflo · error

Unsupported environment for WASM loading

Error message

Unsupported environment for WASM loading

What it means

WasmBridge.loadWasm() detected a runtime that is neither Node.js, browser, nor web worker, so it has no loading strategy for the WASM binary. There is nothing to fall back to, so the load fails; run in a supported environment.

Source

Thrown at v3/plugins/prime-radiant/src/wasm-bridge.ts:163

      this.loadTime = performance.now() - startTime;
    }
  }

  /**
   * Load WASM module from path
   *
   * Supports Node.js, browser, and web worker environments.
   */
  async loadWasm(wasmPath?: string): Promise<void> {
    const path = wasmPath ?? this.config.wasmPath ?? DEFAULT_WASM_PATH;

    try {
      if (isNode) {
        await this.loadWasmNode(path);
      } else if (isBrowser || isWebWorker) {
        await this.loadWasmBrowser(path);
      } else {
        throw new Error('Unsupported environment for WASM loading');
      }
    } catch (error) {
      if (this.config.enableLogging) {
        console.warn(`[Prime Radiant] Failed to load WASM from ${path}:`, error);
      }
      throw error;
    }
  }

  /**
   * Load WASM in Node.js environment
   */
  private async loadWasmNode(wasmPath: string): Promise<void> {
    try {
      // Try dynamic import of the WASM package
      // Specifier behind a string var so tsc doesn't statically resolve this
      // optionalDependency at build time (TS2307 when it isn't installed).
      const pkg: string = 'prime-radiant-advanced-wasm';

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Load the WASM module in a supported environment (Node or browser with fetch/fs), or provide a platform-specific loader.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/plugins/prime-radiant/src/wasm-bridge.ts:163 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/99715d7a9cb328da. Report an issue: GitHub.