You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2022. It is now read-only.
Hi, thanks for this great buildpack. It has really made deploying react apps much easier!
However, I am experiencing some behavior possibly related to this issue, where a re-deploy is required AFTER setting REACT_APP_ env vars in order for them to be recognized on Heroku.
Steps to reproduce:
Add some code to your react app which references and prints an env var, like var API_URL = process.env.REACT_APP_API_URL || "http://localhost:5000".
Then commit and deploy the code to heroku via git push heroku master.
Then set the env var via heroku config:set REACT_APP_API_URL="my-api-url"
When you visit the site, you'll see it not recognize the env var.
After re-deploying again AFTER setting the env var, you'll see it works.
Desired behavior:
When I set an env var on Heroku, perhaps the build should be re-triggered or something, so a re-deploy is not necessary.
Version:
I believe I'm using the most recent version of this buildpack, but not sure how to check. This is the output from heroku buildpacks:versions mars/create-react-app:
Version Released At Status
─────── ──────────────────────── ─────────
7 2019-03-11T14:43:39.712Z published
6 2018-12-23T16:31:59.674Z published
5 2018-10-08T20:48:34.131Z published
4 2018-10-02T16:59:42.585Z published
3 2018-09-23T20:00:49.383Z published
2 2018-09-11T18:31:36.419Z published
1 2018-05-30T18:32:49.395Z published
The text was updated successfully, but these errors were encountered:
I see. However to stay consistent with the normal Heroku environment variable experience, I recommend that any setting of REACT_APP environment variables will trigger a re-build. Is that possible?
Hi, thanks for this great buildpack. It has really made deploying react apps much easier!
However, I am experiencing some behavior possibly related to this issue, where a re-deploy is required AFTER setting
REACT_APP_
env vars in order for them to be recognized on Heroku.Steps to reproduce:
var API_URL = process.env.REACT_APP_API_URL || "http://localhost:5000"
.git push heroku master
.heroku config:set REACT_APP_API_URL="my-api-url"
After re-deploying again AFTER setting the env var, you'll see it works.
Desired behavior:
When I set an env var on Heroku, perhaps the build should be re-triggered or something, so a re-deploy is not necessary.
Version:
I believe I'm using the most recent version of this buildpack, but not sure how to check. This is the output from
heroku buildpacks:versions mars/create-react-app
:The text was updated successfully, but these errors were encountered: