process.env undefined in Node app

后端 未结 1 576
一向
一向 2021-02-12 14:55

When running my Node app with node server.js, process.env returns undefined, so I\'m unable to access any environment variables. This also

相关标签:
1条回答
  • 2021-02-12 15:37

    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.

    0 讨论(0)
提交回复
热议问题