-
Notifications
You must be signed in to change notification settings - Fork 129
Description
Bug Description
The hyperspace wallet commands fail with the error message "Wallet unavailable — install ethers: npm i ethers" even though ethers is installed globally. This also causes hyperspace hive points to show 0.00 even when causes are actively earning points.
Environment
- Hyperspace version: v3.5.5
- Install method: install-script
- Runtime: Node.js v22.22.1 (embedded in SEA binary)
- Platform: linux x64
- OS: Ubuntu (kernel 6.8.0-35-generic)
Steps to Reproduce
- Install hyperspace via official install script
- Run
hyperspace wallet show - Observe error: "Wallet unavailable — install ethers: npm i ethers"
Expected Behavior
Wallet should initialize and display address/balance. Points should be visible in hyperspace hive points.
Actual Behavior
$ hyperspace wallet show
Wallet unavailable — install ethers: npm i ethers
$ hyperspace hive points
┌─ Points Summary ─────────────────────┐
│ Total: 0.00 pts │
Root Cause Analysis
The binary is built as a Node.js SEA (Single Executable Application). Enabling debug output reveals:
$ NODE_DEBUG=module hyperspace wallet show 2>&1
MODULE 242550: looking for "ethers" in [
"/home/runner/work/p2pnetwork/p2pnetwork/apps/cli/release/sea-bundle.cjs/node_modules",
"/home/runner/work/p2pnetwork/p2pnetwork/apps/cli/release/node_modules",
...
"/node_modules",
"/root/.node_modules",
"/usr/local/lib/node"
]
Wallet unavailable — install ethers: npm i ethers
The wallet module performs a dynamic import:
const { AgentWallet } = await import("@hyperspace/wallet");
// which internally calls:
return import("ethers");The issue: ethers is not bundled into the SEA binary, and the hardcoded module search paths don't resolve to any user-installable location.
Workaround Attempts
| Attempt | Result |
|---|---|
npm i ethers -g |
❌ Not found by SEA |
Symlink to /node_modules/ethers |
❌ Same issue |
Symlink to /root/.node_modules/ethers |
❌ Same issue |
Set NODE_PATH environment variable |
❌ SEA ignores it |
| Copy full ethers package to search paths | ❌ Same issue |
Impact
- Points ARE being earned (visible in
hyperspace causes status- 655+ pts accumulated) - Points display shows 0.00 because it requires wallet to read from A1 blockchain
- All wallet-related commands are non-functional (
staking,payments,on-chain, etc.)
Suggested Fix
Please ensure ethers is bundled into the SEA binary during the build process, or provide alternative module resolution that respects user-installed packages.