Prerequisites and Limitations
This guide is specifically for x86 architecture only. On ARM devices, both pnpm and Node.js may fail due to libgcc_s.so.1 dependency issues.
System Configuration
First, configure your build target for musl-based systems:
ei config x86_64-unknown-linux-musl
Installing Required Dependencies
Install libstdc++
OpenWrt's minimal environment lacks the C++ standard library:
opkg install libstdcpp
Install Bash
OpenWrt ships with a basic sh shell, but Node.js and pnpm require bash's advanced syntax features.
Download a static bash binary from robxu9/bash-static:
ei robxu9/bash-static
Replace the default shell symlinks:
which bash
ln -sf /root/.ei/bash /bin/sh
ln -sf /root/.ei/bash /bin/bash
Installing Node.js
Node.js requires approximately 200MB of storage. On space-constrained OpenWrt devices, install to /tmp:
ei https://unofficial-builds.nodejs.org/download/release/v25.2.1/node-v25.2.1-linux-x64-musl.tar.xz -d /tmp
node --version
Note: Use the unofficial-builds repository for musl-compatible binaries.
Installing Package Managers and Tools
Install pnpm
ei pnpm/pnpm
pnpm --version
Install Git (Gitoxide)
For a lightweight Git implementation:
ei GitoxideLabs/gitoxide
gix --version
Creating and Running a Vite Project
Now you can use modern web development tools:
# Create a new Vite project
pnpm dlx create-vite
# Navigate to your project
cd react-ts
# Start the development server (accessible from network)
pnpm run dev --host
The --host flag exposes the dev server to your local network, allowing you to access it from other devices.
Top comments (0)