1

I want to use NODE_ENV in my Create-React-App as described in https://medium.com/@tacomanator/environments-with-create-react-app-7b645312c09d

But when I run it on Heroku, process.env reports { NODE_ENV: "development", PUBLIC_URL: "" } - why? NODE_ENV is production in my Heroku dashboard.

1 Answer 1

9

I solved it myself with the create-react-app-buildpack buildpack:

heroku buildpacks:add https://github.com/mars/create-react-app-buildpack.git

And then redeployed my app to Heroku.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.