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

Yarn install support for modules referenced as file:

fredyc
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!
November 3, 2018

To use some experimental node modules, instead of publishing a fork to temporary repo I've opted for commiting content of such module inside the repo and then reference it inside the package.json with a `file:` prefix. Locally it's working perfectly and even with a fresh install the content is copied over to node_modules.

When running in pipelines, the installation with the Yarn completes successfully, but running tests of the app fails as it cannot find that module. It would mean that copying of those files failed for some reason which is not apparent from logs.

Is it perhaps possible to see artifacts of a failed build? Or what can I do to figure this out?

Locally using Node 10.12.0 with Yarn 1.10.1. In the pipelines I've used `image: node:10.12.0` which comes with a same version of the Yarn. I would perhaps try it running locally through that Docker image, but I am not entirely sure how to do that.

1 answer

1 accepted

0 votes
Answer accepted
Steven Vaccarella
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2018

Hi Daniel,

You can indeed create and download artifacts for failed builds: https://confluence.atlassian.com/bitbucket/using-artifacts-in-steps-935389074.html

If you want to save your entire build directory, use the artifact pattern "**", including the quotes (provided your build directory is likely to be under the artifact limit, which is currently 1GB).

Debugging locally is also a great idea and you can find detailed instructions for how to do that here: https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events