Skip to content

Start RC - Environment Variables aren't loaded automatically #5217

@ryanagillie

Description

@ryanagillie

Which project does this relate to?

Start

Describe the bug

Environment variables are not automatically loaded as stated in the docs.

Your Example Website or App

https://github.com/ryanagillie/tanstack-start-rc-env-bug

Steps to Reproduce the Bug or Issue

  1. Clone Repo
  2. pnpm install
  3. pnpm run dev
  4. Navigate to localhost:3000/

Expected behavior

Greeting (HELLO, WORLD!) should be displayed as the env variable is passed through a server function to the loader, additionally the greeting should be displayed in the console (both server and client) but both return undefined

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.132.3
  • OS: macOS Tahoe 26.0
  • Browser: Chrome
  • Browser Version: 140.0.7339.208
  • Bundler: vite
  • Bundler Version: 7.1.7

Additional context

No response

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