Skip to content

Linux/WSL: Missing loro_wasm_bg.wasm in CLI release package causes daemon startup failure; after restoring the file, daemon fails with duplicate search command registration #48

Description

@UniquePratham

Bug Report

Summary

I encountered two consecutive issues while installing and running the latest Hyperspace CLI on WSL2 (Linux x64).

The first issue is a missing runtime asset (loro_wasm_bg.wasm) in the published CLI package. After manually restoring the correct file from the upstream loro-crdt@1.10.6 package, the daemon progresses further but immediately fails with a duplicate command registration error.

These issues appear to be independent of my local environment and are reproducible.


Environment

Component Value
Hyperspace CLI v2 (5.85.32)
Runtime Node.js v22.18.0
Platform Linux x64
Kernel 6.18.33.1-microsoft-standard-WSL2
Distribution Kali Linux (WSL2)
GPU NVIDIA GeForce RTX 4050 Laptop GPU

Issue 1: Missing loro_wasm_bg.wasm

Running:

hyperspace daemon

fails with:

Fatal error: Error: ENOENT: no such file or directory,
open '/home/<user>/.local/bin/loro_wasm_bg.wasm'

Stack trace:

../../node_modules/.pnpm/loro-crdt@1.10.6/node_modules/loro-crdt/nodejs/loro_wasm.js

Investigation

The official release archive:

aios-cli-x86_64-unknown-linux-gnu.tar.gz

does not contain:

loro_wasm_bg.wasm

However, the exact upstream dependency used by the CLI:

loro-crdt@1.10.6

does include:

package/nodejs/loro_wasm_bg.wasm

I extracted the matching WASM file and copied it to:

~/.local/bin/loro_wasm_bg.wasm

After doing so, the original ENOENT error disappeared completely.

This suggests the published CLI package is missing a required runtime asset.


Issue 2: Duplicate command registration

After restoring the missing WASM file, running:

hyperspace daemon

now fails with:

Fatal error:
Error: cannot add command 'search' as already have command 'search'

Stack trace:

attachAgentsAppsVerbs()
registerAllCommands()
Commander.js

Reproduction

This issue reproduces consistently with:

  • Fresh installation
  • Fresh HYPERSPACE_HOME
  • Fresh $HOME
  • Fresh XDG_CONFIG_HOME
  • Fresh XDG_DATA_HOME

Example:

HOME=$(mktemp -d) hyperspace daemon

Result:

Fatal error:
cannot add command 'search' as already have command 'search'

This indicates the duplicate registration is occurring internally and is not caused by user configuration.


Additional observations

The CLI help works correctly:

hyperspace --help

However:

hyperspace daemon

always fails with the duplicate search registration after the missing WASM file is restored.


Expected behavior

  • The release package should include all required runtime assets.
  • hyperspace daemon should start successfully without requiring manual intervention.
  • Command registration should occur only once.

Actual behavior

  1. Missing loro_wasm_bg.wasm
  2. Manual restoration required
  3. Daemon then fails due to duplicate search command registration

Notes

I spent some time debugging this to isolate the issue from local configuration problems.

I verified:

  • ✅ GPU configuration
  • ✅ WSL configuration
  • ✅ Clean user profiles
  • ✅ Fresh Hyperspace home
  • ✅ Official release package contents

The behavior is reproducible and appears to originate from the distributed CLI itself rather than the local environment.

If this is useful, I'd be happy to investigate further or submit a fix/PR if the relevant source for this component is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions