Node.js process.env.USER value unexpected

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
rod724
Level 1
Level 1
Posts: 1
Joined: Sat Jun 16, 2018 8:53 pm

Node.js process.env.USER value unexpected

Post by rod724 » Sat Jun 16, 2018 8:57 pm

I have a simple Node.js app that uses p

Code: Select all

rocess.env.USER.
I have a .env file that has the USER=desireduser.
However, when program runs the USER value is the user of my laptop.

Any ideas?

rene
Level 8
Level 8
Posts: 2228
Joined: Sun Mar 27, 2016 6:58 pm

Re: Node.js process.env.USER value unexpected

Post by rene » Sun Jun 17, 2018 8:20 am

rod724 wrote:
Sat Jun 16, 2018 8:57 pm
Any ideas?
How could we without any information, doubly seeing as how this is not a Node.js forum? Please post at least a minimal example showing the issue. Generic information: https://www.npmjs.com/package/dotenv; see the "What happens to environment variables that were already set?" FAQ.

Post Reply

Return to “Software & Applications”