Companion to the main README.md.
Run./scripts/verify_env.shto check your environment automatically.
| Requirement | Minimum | Notes |
|---|---|---|
| OS | Linux (x86-64) or macOS 12+ | WSL2 on Windows |
| RAM | 4 GB | 8 GB recommended for --release builds |
| Disk | 2 GB free | Rust toolchain + WASM target + node_modules |
| Rust | stable (≥ 1.74) | rustup update stable |
| Stellar CLI | ≥ 20.0.0 | Renamed from soroban in v20 |
| Node.js | ≥ 18 | Required for frontend UI and JS tests |
| npm | ≥ 9 | Bundled with Node 18+ |
Symptom
error[E0463]: can't find crate for `std`
= note: the `wasm32-unknown-unknown` target may not be installed
Fix
rustup target add wasm32-unknown-unknown
rustup target list --installed | grep wasm32Verify
cargo build --release --target wasm32-unknown-unknown -p crowdfundSymptom
soroban: command not found
# or
error: unexpected argument '--source-account' found
Background
The CLI was renamed from soroban to stellar in v20. Scripts using soroban
will fail on newer installs.
Fix
curl -Ls https://soroban.stellar.org/install-soroban.sh | sh
source ~/.bashrc # or ~/.zshrc / ~/.profile
stellar --version # should print stellar-cli x.y.zVerify
stellar contract --helpFriendbot automatically funds new testnet identities.
stellar keys generate --global alice --network testnet
stellar keys address alice
# Fund via friendbot (automatic on first use with --network testnet)Futurenet requires manual funding and a separate network config.
stellar network add futurenet \
--rpc-url https://rpc-futurenet.stellar.org:443 \
--network-passphrase "Test SDF Future Network ; October 2022"
stellar keys generate --global alice-futurenet --network futurenet
# Fund manually via https://friendbot-futurenet.stellar.orgSecurity assumption: The
.soroban/directory and~/.config/stellar/contain plaintext secret keys. Never commit them to version control..soroban/is already in.gitignore— verify withgit check-ignore -v .soroban.
After updating Rust, the WASM target may need to be re-added.
rustup update stable
rustup target add wasm32-unknown-unknown
cargo clean && cargo build --release --target wasm32-unknown-unknownSoroban tests spin up an in-process ledger. Running many tests in parallel can exhaust memory on low-RAM machines.
# Limit parallelism
cargo test --workspace -- --test-threads=2Symptom
SyntaxError: Unexpected token '?'
# or npm WARN EBADENGINE Unsupported engine { required: { node: '>=18' } }
Fix
# Install nvm if not present
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 18
nvm use 18
node --version # v18.x.xVerify
cd frontend && npm install && npm test -- --runSymptom
npm ERR! ERESOLVE unable to resolve dependency tree
Fix
npm install --legacy-peer-depsOnly use
--legacy-peer-depsif you understand the dependency tree. Prefer resolving the conflict explicitly inpackage.jsonfor production builds.
Symptom
Error: EADDRINUSE: address already in use :::3000
Fix
# Find and kill the process occupying port 3000
lsof -ti:3000 | xargs kill -9
npm run devAlternatively, configure a different port in vite.config.ts (or next.config.js):
// vite.config.ts
export default { server: { port: 3001 } };Symptom
Design tokens (--color-docs-bg, --color-docs-accent, etc.) render as empty
strings or fall back to defaults unexpectedly.
Cause
The useDocsCssVariable hook reads from getComputedStyle at runtime. If the
stylesheet containing the variable declarations hasn't loaded yet (e.g., SSR or
lazy CSS), the hook returns the fallback value.
Fix
-
Ensure the global CSS file that declares the variables is imported in your app entry point (e.g.,
_app.tsxormain.tsx):import '../styles/globals.css';
-
Provide meaningful fallback values in every
useDocsCssVariablecall:const bg = useDocsCssVariable('--color-docs-bg', '#FAFAFA');
-
For SSR environments, guard the hook with a
typeof window !== 'undefined'check or use auseEffectto defer resolution to the client.
Run the environment check script before opening a PR or filing a bug report:
./scripts/verify_env.shThe script checks:
rustc,cargo,stellarare on$PATHwasm32-unknown-unknowntarget is installednodeandnpmmeet minimum version requirements- A dry-run build of the crowdfund contract succeeds
Exit codes: 0 = all checks passed, 1 = one or more checks failed.
- Never commit
.soroban/or~/.config/stellar/— they contain secret keys. - Use a multisig or governance contract as the
adminfor mainnet deployments, not a plain keypair (seedocs/admin_upgrade_mechanism.md). - Rotate keys immediately if a secret is accidentally pushed to a public repo.
Use
stellar keys remove <name>and generate a new identity. - CSS variable values are validated against an allowlist by
CssVariableValidatorto prevent CSS injection (seedocs/css_variables_usage.md). - Never embed secret keys, XDR payloads, or account mnemonics in frontend error
messages — the
FrontendGlobalErrorBoundarystrips stack traces in production, but the message string itself is still surfaced to users.