I have encountered a challenge while trying to deploy my project to a server using bitbucket-pipeline with a .yml script. The project consists of a Laravel backend with PHP 7.4 and a Vue Js frontend. The issue arises during the frontend build process with Yarn Run. Interestingly, the build process works perfectly on both my colleague's and my local machines with identical yarn.lock and package.json files, but not in the pipeline. Additionally, we are running the same node and yarn/npm versions locally.
Below is our current pipeline script:
image:
name: atlassian/default-image:2
definitions:
steps:
- step: &laravel-deploy
name: Laravel Deployment
caches:
- composer
image: php:7.4.12-fpm
script:
- mkdir -p "$REMOTE_PATH/$BITBUCKET_BUILD_NUMBER"
//rest of the script remains unchanged...
The specific error occurs at the following step: - yarn run $YARN_RUN, leading to an error message that consistently states SyntaxError: Unexpected token :
//error messages continue here...
This is our package.json file:
{
//package.json contents remain unchanged...
}
We have attempted various solutions including updating babel packages, modifying the babelrc file, and testing different package managers without success so far.