process.env.NODE_ENV is undefined

后端 未结 13 1832
南旧
南旧 2020-11-28 18:26

I\'m trying to follow a tutorial on NodeJs. I don\'t think I missed anything but whenever I call the process.env.NODE_ENV the only value I get back is undefine

13条回答
  •  难免孤独
    2020-11-28 18:50

    If you faced this probem in React, you need react-scripts@0.2.3 and higher. Also for other environment variables than NODE_ENV to work in React, they need to be prefixed with REACT_APP_.

提交回复
热议问题