Cloudflare DevelopersCD
Cloudflare Developers2y ago
16 replies
Magick

Bun and Environment Variables - how?

I'm trying to read environment variables and everything I try seems to fail.

Here are some of the attempts and issues.

- Using
import { env } from "bun";
results in
ERROR: Could not resolve "bun"
.
-
const test_env = process.env.TEST_ENV;
results in
Uncaught ReferenceError: process is not defined
Was this page helpful?