Add yarn to circleci/node images


I note the Node images don’t have yarn installed. It’d be great if they did.


They do;

$ docker run -it circleci/node:6.10.3 bash
circleci@9bf0a15ef2bc:/$ yarn --version

#!/bin/bash -eo pipefail
yarn install
/bin/bash: yarn: command not found
Exited with code 127

From circleci/node:6.10

$ docker run -it circleci/node:6.10 yarn --version


Not a hugely helpful answer. I’ll potter on it I guess.


I am moving this to the support category to get you a better answer.

$ docker run -it circleci/node:6.10 which yarn

Can you reference it absolutely like /usr/local/bin/yarn install?


It must be path related. I futz’ed with the path and forced it directly and now tis all happy.


How can I tell which builds do and don’t have yarn?

6.10.3 does, but a super crazy old version.
6.13.1 does not

If the latest images don’t have it - what is the correct way to install it?


There’s several (very recent) threads about Yarn going missing, but I’d start off with trying sudo apt-get install yarn, if the version included in the Ubuntu repo is recent enough for you. If not, I imagine there is a way to get the latest stable - it will be in the Yarn docs.