actions / actions/setup-node

Yarn is not installed

Open
#182 23 comments 159 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request needs eyes
Dominant language
TypeScript
Stars
5k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
2

Description

We are using a self-hosted runner and using this action to setup-node and install yarn.

I know on github-hosted runners, yarn is already pre-installed but it would be good if yarn was installed by this action for those of us using self-hosted.

Running setup-node with the following workflow and it works

 with:
    node-version: 12.13.0
    always-auth: true
    registry-url: https://registry.npmjs.org

/usr/bin/tar xz --warning=no-unknown-keyword -C /actions-runner/_work/_temp/febce1c0-314e-4a14-9a65-5bde8a990b71 -f /actions-runner/_work/_temp/d4bf33ab-571e-458e-9495-bd6c5b994814
/actions-runner/_work/_tool/node/12.13.0/x64/bin/node --version
v12.13.0
/actions-runner/_work/_tool/node/12.13.0/x64/bin/npm --version
6.12.0

Note that node and npm are installed.

A later step in the workflow then attempts to run yarn:

Run yarn install --ignore-scripts --frozen-lockfile
/actions-runner/_work/_temp/58e53b82-f9ae-4c68-9cec-75f75831208b.sh: line 1: yarn: command not found
##[error]Process completed with exit code 127.

This of course works on github hosted runners just fine, but since I just migrated to an EC2 instance that doesn't have yarn installed, I am now having issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the setup-node action entry point and how it installs Node and npm on self-hosted runners. The issue names no files or tests, so inspect the repository structure first. Done means a self-hosted runner can run yarn after setup-node, while the existing Node setup continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.