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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.