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

Yarn: command not found

Adam Polak March 16, 2018

Since about 12PM we're receiving an error: 

bash: yarn: command not found

We're using default node:8 image

image: node:8
pipelines:
    default:
        - step:
            caches:
                - node
            script:
                - yarn install
                - yarn run flow
                - yarn run build
                - yarn run test --coverage --no-cache

 Does anything changed between 10AM and 12PM - last success build on the same pipelines config was at 10:20AM

4 answers

1 accepted

0 votes
Answer accepted
Adam Polak March 18, 2018

For those having the same problem:

We had to change image from 

image: node:8

to

image: node:9.7.1 
0 votes
Ramon de Jezus January 6, 2021

For me it turned out that I accidentally redefined $PATH in bitbucket pipelines environment variables, causing the same message. Took a while to figure it out...

0 votes
rafawalter March 26, 2019

Works with 

image: node:6.17.0 
0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2018

Alternatively, for anyone using an image that doesn't have yarn installed you can also install it as part of your build.

For example, add an installation command to your script such as:

- npm install yarn
pablofmorales June 4, 2018

doesn't work 

Miklos Szanyi July 25, 2018
- npm install -g yarn
Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events