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

Can't prepare an expo build with bb pipelines

Mykhailo Malkush
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 7, 2023

image: atlassian/default-image:2

pipelines:
  branches:
    master:
      - step:
        name: Packages
        script:
          - npm install
          - npm install -g expo-cli
          - npx expo export:web
        artifacts:
          - web-build/**
      - step:
        name: Deploy to S3
        deployment: production
        script:
          - pipe: atlassian/aws-s3-deploy:0.3.8
            variables:
              AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
              AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
              AWS_DEFAULT_REGION: 'us-east-1'
              S3_BUCKET: 'book3.app'
              LOCAL_PATH: 'web-build'
              ACL: 'public-read'

here is my pipeline.

But

npx expo export:web

fails with:

+ npx expo export:web
(node:19536) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token {
(node:19536) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:19536) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): SyntaxError: Unexpected token .

It works fine on my local machine.
Did you have any ideas what can be wrong?

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 10, 2023

Hey @Mykhailo Malkush ,

Thank you for reaching out to Atlassian Community!

The error shown in your build seems to be related to your current code/configuration. I would suggest trying to debug your pipelines locally using docker, to replicate the same environment we have in bitbucket pipelines.

You can follow the instructions in the below documentation to run your build locally within a docker container : 

By running it locally you can confirm if it fails with the same error or if it runs successfully. If it fails with the same error, you can try fixing it locally before pushing the changes to bitbucket, which would prevent you from wasting your build minutes.

Let me know if you have any questions.

Thank you, @Mykhailo Malkush !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events