Skip to content

Conversation

@tomerweller
Copy link
Contributor

Summary

  • Add validation for INDEXER_URL and INDEXER_V2_URL environment variables in webpack dev and extension configs
  • Build now fails fast with a clear error message if these variables are not defined
  • Added documentation to main README about configuring environment variables before starting dev server

Problem

When running yarn start for local development, the dev server starts successfully even when required environment variables are missing. This leads to confusing runtime errors like "Failed to fetch your account balances" that are difficult to diagnose.

Solution

The webpack configs now validate that required environment variables are set before the build starts. If missing, developers see a clear error:

ERROR: Missing required environment variables:
  - INDEXER_URL
  - INDEXER_V2_URL

Please create an extension/.env file with the following variables:
  INDEXER_URL=<backend-url>
  INDEXER_V2_URL=<backend-v2-url>

See extension/README.md for configuration details.

Test plan

  • Remove/rename extension/.env and run yarn start - should see clear error message
  • With proper .env in place, yarn start should work as before

Fixes #2489

🤖 Generated with Claude Code

Add validation for INDEXER_URL and INDEXER_V2_URL environment variables
in the webpack dev and extension configs. The build will now fail fast
with a clear error message if these variables are not defined.

Also added documentation to the main README about configuring these
environment variables before starting the dev server.

Fixes stellar#2489

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@tomerweller tomerweller marked this pull request as ready for review January 6, 2026 22:11
tomerweller and others added 2 commits January 6, 2026 17:27
CI handles env vars via secrets, so skip the local validation when
CI=true is set (standard GitHub Actions environment variable).

🤖 Generated with [Claude Code](https://claude.ai/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev server should validate required env variables on startup

3 participants