Changelog - 2026-07-17
Secrets Peers Invisible to Bundlers
Bug Fix Behavior ChangeIn one line. Compiling an application with Bun.build no longer fails on the optional secrets peers, so external: ['node-vault'] workarounds can be removed.
What changed
- No bundle-time resolution.
Bun.buildno longer tries to resolvenode-vaultand@dotenvx/dotenvx. Before, every app compiling a binary failed unless the peer was installed or listed inexternal. - Clear error for a missing peer. Constructing
HashiCorpVaultHelperorDotenvVaultHelperdirectly (via/hashicorp-vaultor/dotenv-vault) without the peer now throws the sameApplicationErroras the factory path (Please install 'node-vault'), not a raw module-not-found error. - The peer is no longer embedded in compiled binaries. Before, referencing a vault provider with the peer installed made
Bun.buildbundle it.
Who is affected
- Apps that compile binaries without a vault provider. Fixed for free. Remove any
external: ['node-vault']entry from yourBun.buildcalls. - Apps that compile binaries and use a vault provider. Ship the peer in
node_modulesnext to the binary, or inject a ready-madeclient(HashiCorp) ordecode(dotenv) through the helper options. - Apps that do not compile binaries. No action needed.