Skip to content

Skip empty sst bind env values to preserve local config (Turbopack fix)#126

Open
TobiasMaehl-pIX wants to merge 2 commits intoanomalyco:masterfrom
TobiasMaehl-pIX:fix/sst-bind-empty-envs
Open

Skip empty sst bind env values to preserve local config (Turbopack fix)#126
TobiasMaehl-pIX wants to merge 2 commits intoanomalyco:masterfrom
TobiasMaehl-pIX:fix/sst-bind-empty-envs

Conversation

@TobiasMaehl-pIX
Copy link

  • Problem: sst bind overwrites local env vars with empty strings from stack metadata. With Next.js Turbopack this can break client hydration.
  • Fix: Filter out empty/undefined env values before merging into process env when running bound commands.
  • Impact: Local dev works with sst bind + Turbopack, no change to non-empty envs.

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for sst-docs canceled.

Name Link
🔨 Latest commit 629e75f
🔍 Latest deploy log https://app.netlify.com/projects/sst-docs/deploys/6972ae36129efa0008bccfaf

@FlanaganSe
Copy link

I think sst bind overwrites all local variables, not just those that are empty. You may not have noticed because many of them probably contained the same values.

This is only an issue if you're trying to develop locally with the same stage name as what is already deployed.
If you use a different stage name your local .env values won't be overwritten

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.

2 participants