Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,913
Community Members
 
Community Events
165
Community Groups

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

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 Sep 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
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,263 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you