Yarn is not installed
See original GitHub issueWe 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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:91
- Comments:14
Top Results From Across the Web
Installation
Windows. There are three options for installing Yarn on Windows. Download the installer. This will give you a .msi file that when run...
Read more >yarn: command not found error [Solved]
To solve the error "yarn: command not found", install the yarn package globally by running npm install -g yarn and restart your terminal....
Read more >npm install yarn -g not working · Issue #599 · yarnpkg/yarn
Trying to install it as it says in the intro post and I'm running into an issue with the bin not being linked....
Read more >4 Methods for How to Install Yarn on Windows Server
First, you need to download the Yarn install package. Download the Yarn .msi installer from the official Yarn website. Step 2: Locate and...
Read more >How to fix the Yarn Installation Error "The term yarn is not ...
This is a snippet from my previous video hence there is not intro and ... how to install yarn the term node is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Workaround is to install yarn yourself using npm (after running this action)
and later can uninstall it -
While this works, I find it rather hacky. It would be good for this action to not need to rely on github’s instances to have yarn package installed.
EDIT: I wanted to add the documentation acts as if
yarn
is a given, since it has sections on usage with yarnPublish to npmjs and GPR with yarn:
. Perhaps some clarification in that section that if you’re on self-hosted runners you will need to install yarn yourself vianpm install -g yarn
and uninstall it at the end of your job withnpm uninstall -g yarn
Note that if you use
with: cache: yarn
this action will fail if you don’t have yarn pre-installed… But since you need node to install yarn… you can’t get out of this without running this action twice or using other actions.