Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I use bitbucket variables with node.js process.env in my create-react-app?

Roman Schepkin September 17, 2021

Hi.

I use the create-react-app and bitbucket pipeline. I have defined bitbucket variables in repo settings, but Bitbucket Variables in my js code are undefined. I'm trying to call process.env.URL(my variable in bitbucket) when process.env.NODE_ENV is in production mode.

What's wrong with my expectations? Can I use it in my code? Could this be a bitbucket problem?

 I would be grateful for any help. Thanks a lot.

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2021

Hi, @Roman Schepkin! Welcome to the community! 

It looks like you have defined a Repository variable name (process.env.URL) and you are trying to call a different variable name (process.env.NODE_ENV) in your code, is that correct? 

In order to troubleshoot the issue further, could you please share the following information with me?

  1. The repository variable name; 

  2. How you are using the variable name in your code. Please share the entire line of the code; 

Thank you.

Kind regards,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events