I have a ReactJs web app that is deployed to two environments: staging and production
Each environment uses different firebase api key and some custom parameters.
So i setup those params as environment variables in two Deployment environments: Staging and Production. As guide: https://confluence.atlassian.com/bitbucket/set-up-bitbucket-deployments-968683907.html
When running the webpack build command, it will read those environment variables from bitbucket deployment environment base on the environment i want to deploy to.
My problem is: if i specify the `deployment` in my bitbucket pipeline configuration, the webpack build command (`webpack --config webpack.prod.js`) won't work, it says: `/bin/sh: webpack: not found`. If i remove the deployment line, the pipeline run successfully.
It looks like the bitbucket deployment environment had made some changes to the environment variable that npm script couldn't find the webpack executable in `node_module` directory
My `bitbucket-pipelines.yml` is as follow (sorry, i couldn't find a way to indent it):
# Deploy to staging
name: Deploy to staging
- yarn && yarn build
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
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