Skip to content
Advertisement

How to solve: yarn package not found on CircleCi?

I have been trying to learn CircleCi workflows by building simple jobs and I keep getting this error: /bin/bash: yarn: command not found.

So all the steps run but when it comes to the job is self it stops. So spin up environment, preparing env variables, checkout code, Restore Yarn Package Cache are green(successful).

My workflow below:

JavaScript

Not really sure how to fix this..

Thank you very much 🙂

Advertisement

Answer

You’re using cimg/base:2020.01 which is a general purpose image and does not have node or the yarn binary installed. You should use the cimg/node image which has yarn pre-installed.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement