Add yarn to circleci/node images


#1

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


#2

They do;

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

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

From circleci/node:6.10


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

#5

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


#6

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

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

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


#7

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


#8

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?


#9

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.


#10