motdotla/dotenv

The .env file on project root directory is always loaded although a path is set

joeyhvh opened this issue · 1 comments

My problem is that always the .env file at the project root is loaded although I hand over a valid path. Here the code I call the config function.

import { config } from 'dotenv';
import path from 'path';

config({ path: path.resolve("E:/........./ENV-STORE/010.env") });
console.log(process.env);

I made a dummy .env on the top level of the project which is simple a=b. The right 010.env file has a completely key and value pairs. However in the env vars are loaded a: "b", . I dont think that there is a mistake with the dashes. I tried multiple ways with single / and \ and multiple \

I use WSL2 and bun as runtime in my typescript code. Thank you

nvm my fault sry