ruvnet/ruflo · error

WASM file not found: ${resolvedPath}

Error message

WASM file not found: ${resolvedPath}

What it means

loadWasmNode() resolved the WASM path (absolute, or via the node_modules fallback) and fs.existsSync found no file there. The resolved path is included; install the WASM package or correct wasmPath so the loader can read the binary.

Source

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

      const path = await import('path');

      let resolvedPath = wasmPath;

      // Try to resolve path
      if (!path.default.isAbsolute(wasmPath)) {
        // Try node_modules
        const nodeModulesPath = path.default.join(
          process.cwd(),
          'node_modules',
          wasmPath
        );
        if (fs.existsSync(nodeModulesPath)) {
          resolvedPath = nodeModulesPath;
        }
      }

      if (!fs.existsSync(resolvedPath)) {
        throw new Error(`WASM file not found: ${resolvedPath}`);
      }

      const wasmBuffer = fs.readFileSync(resolvedPath);
      this.bundleSize = wasmBuffer.length;

      const wasmModule = await WebAssembly.compile(wasmBuffer);
      const importObject = this.createImportObject();
      const instance = await WebAssembly.instantiate(wasmModule, importObject as WebAssembly.Imports);

      this.wasmModule = instance.exports as unknown as WasmModule;

      if (this.config.enableLogging) {
        console.log(`[Prime Radiant] WASM module loaded from ${resolvedPath}`);
      }
    }
  }

  /**

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Verify the file path exists; resolve it relative to the module/package root rather than the process cwd.
  2. Ensure the build/bundling step copies the WASM asset to the expected output location.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/plugins/prime-radiant/src/wasm-bridge.ts:217 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/150790964bf103ca. Report an issue: GitHub.