Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
Environmental variable read issue in Heroku deployed app

I got a React/Node.js app which is deployed to Herouku.

I have an env variable named REACT_APP_BASE_URL which value is http://localhost:4000 locally and the production site's URL in Heroku's config vars.

The issue appears when i'm trying to send an SMS with a string containing the URL, like so:

const msg = `Hello! view your profile in ${process.env.REACT_APP_BASE_URL}/user/${id}` 

Locally it works fine and but in production the result is:

Hello! view your profile in /user/${id}

I would guess it can't read the value from Heroku's config vars, but this isn't the case as this base url reference is working fine in other places in the same component (XHR requests where I paste it the same way and are happening just before the problematic call).

Any idea?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!