When running my Node app with node server.js, process.env returns undefined, so I\'m unable to access any environment variables. This also
node server.js
process.env
undefined
I figured it out. process is an object (https://nodejs.org/api/process.html), but I'd defined my own function (also called process) that overwrote it. Changing the name of my function fixed the problem.
process