Skip to content

Process.env not updating when editing .env and rerunning dotenvx #610

@derikb

Description

@derikb

Can't seem to find this anywhere....

I have a process running via pm2 in node 24 using a dotenvx run -- pm2 start ecosystem.config.js --env production

I have an environmental variable I need to change.

a) I edit .env (I am both renaming the var AND changing the value)
b) I stop my process pm2 stop ecosystem.config.js --env production
c) I restart the process (same command as above)

The environmental var does not change in process.env. I still see the old name of the var with the old value and the newly named one is nowhere to be found when I just log process.env in my process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions