Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

FEATURE REQUEST: Guide to using .env variables in development #64

@danielh-official

Description

@danielh-official

I'm trying to make it work, but whenever I run npm run dev, my .env gets ignored. I have dotenv 16.0.3 installed, and I've used dotenv.config(), but it all leads to the same problem.

When I console.log(dotenv.config()), I get an error in the console, like:

Error: ENOENT: no such file or directory, open '/.env'

My .env file is in the root, and I've placed it in my main.ts (in the root) and other files within different directories. Same result throughout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions