I am using create react app to bootstrap my app.
I have added two .env files .env.development and .env.production in the root.
.env
.env.development
.env.production
Had this same problem! The solution was to close the connection to my node server (you can do this with CTRL + C). Then re-start your server with 'npm run start' and .env should work properly.
Source: Github