geeklearningio / gl-vsts-tasks-yarn

Yarn Package Manager Visual Studio Team Services Build and Release Management extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wont execute - wrong agent version

Jonesie opened this issue · comments

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

When I try to execute a build, the result is:
image

Insert your description here
I have agent version 2.165. Do I need to revert to an earlier version or can I force the yarn task (and npm I guess) to use my slightly later version?

Expected behavior

It should work?

Reproduction

Create an azure pipeline yaml with the following task:

- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@3
  displayName: 'Install front end packages'
  inputs:
    projectDirectory: 'src/projectname'
MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • VSTS
  • TFS
  • Azure DevOps

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
Yarn version*

Node version:
Node version*

As the error specifies the missing yarn capability is what blocks your build. You can use the Yarn Installer task or install it yourself an manually add the capability to your agents.

As the error specifies the missing yarn capability is what blocks your build. You can use the Yarn Installer task or install it yourself an manually add the capability to your agents.

I have yarn and npm installed, but I installed these directly not using the task. Does that make a difference?

I have noticed the same issue and solved it by adding "yarn" to the build agent capabilities (as yarn itself is installed). This setting seems not to be needed when using hosted agents (windows2019 in my test case) but it's "needed" for the private build agent that I have created from the windows2019 packer file (https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Azure.json)

The real solution might be different but at least this workaround is working for us.

Seems resolved to me. Thanks