create react app not picking up .env files?

前端 未结 10 2092
醉话见心
醉话见心 2020-12-12 19:52

I am using create react app to bootstrap my app.

I have added two .env files .env.development and .env.production in the root.

10条回答
  •  天命终不由人
    2020-12-12 20:34

    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

提交回复
热议问题