loadEnvFile

Hi. Looking at https://docs.deno.com/api/node/process/~/Process.loadEnvFile It looks like process.loadEnvFile is implemented in deno (using 2.1.9) but it isn't found. What do I not understand?
Deno
Process.loadEnvFile - process - Node documentation
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
4 Replies
harshrastogiexe
This is Node.JS api, in deno you can simply pass then env file using deno run --env=env-file foo.ts For more more info check this out: https://docs.deno.com/runtime/reference/env_variables/#.env-file
Deno
Environment variables
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
johandalabacka
johandalabackaOP3w ago
Thank you for your answer. I know it is an node api but I don't understand why it doesn't work then it is documented on the page. I'm just testing deno:s compatibility with node.
harshrastogiexe
Yes @johandalabacka , opened a issue for same: https://github.com/denoland/deno/issues/28017
GitHub
Missing Node Compatibility Support for process.loadEnvFile · Issu...
According to deno docs the following function is supported in docs here: https://docs.deno.com/api/node/process/~/Process#methods_loadenvfile_16 import process from "node:process"; consol...
johandalabacka
johandalabackaOP2w ago
thanks

Did you find this page helpful?