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

Lerna build not supported on bitbucket pipeline.

Tomo Tomo
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!
March 17, 2023

I am recently try to use lerna to manage my monorepo project. Everything going well on local build but it's just not working on bitbucket pipeline. 

I am keep getting error below. 

ERROR  Failed to compile with 6 errors6:38:31 AM
These dependencies were not found:

* @gtm-support/vue2-gtm in ./src/main.js

* document-register-element/build/document-register-element in ./src/main.js

* vue in ./src/main.js, ./src/store/index.js

* vue-custom-element in ./src/main.js

* vuex in ./src/store/index.js

To install them, you can run: npm install --save @gtm-support/vue2-gtm document-register-element/build/document-register-element vue vue-custom-element vuex

From my understanding, We shouldn't need to have those dependency on the root package.json. It should get install through all the dependency under each packages. 

Not sure if anyone having the same issue.

Here is what i have on my bitbucket-pipelines.yml. 

- step:
name: Build
image: node:14.20
caches: # optional
- node
- npm i
- npm run bootstrap
- npm run build
- packages/**/dist/**


1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 21, 2023

Hi @Tomo Tomo,

Just to give you some context, Pipelines builds run in Docker containers. For every step of your build, a Docker container starts using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in that container, and then the commands of the step's script are executed. When the step finishes that Docker container gets destroyed.

The step that you have in your bitbucket-pipelines.yml file will run in a Docker container that is using the Dockerhub image node with the tag 14.20:

You can use, though, any public and private Docker image including those hosted on Docker Hub, AWS, GCP, Azure, and self-hosted registries accessible on the internet.

The error message that you get simply indicates that certain dependencies are missing from the Docker container where the build is running. This does not necessarily mean that your build is not supported in Pipelines, but that these dependencies need to be installed for your build to run.

Your local environment may have different tools or different versions of the tools you are using than the Docker container where the build is running, which would explain why your build succeeds locally. I'm not very familiar with node and npm so I'm not sure if the version of node and npm are relevant to the behavior you are seeing (in this case you could try using a different tag of the node image that has newer versions) or if the culprit is something different.

You can try installing these dependencies with the command provided in the error and see if that resolves your issue.

If you have any questions, please feel free to reach out.

Kind regards,

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events