Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipelines problem with env variables after publish

Michał Kochman October 14, 2021

Hi,
I have some problem with env variables. For some reason after I publish project by the bitbucket pipeline to jfrog and use the deployed package I have local urls for requests, so it doesn't see variables from .env file.
E.g. env file:
```
REACT_APP_VERSION=$npm_package_version
SOME_URL=https://.....
```
I tried to export variables 
```
- set -o allexport
- source .env
- set +o allexport
- npm run build
- npm publish
```
but it doesn't seem to work :(

1 answer

0 votes
Michał Kochman October 14, 2021

I close the topic :D I've found problem inside webpack config and missing babel load and because of that generated dist did not contain env variables

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events