geeklearningio / gl-vsts-tasks-yarn

Yarn Package Manager Visual Studio Team Services Build and Release Management extensions
MIT License
52 stars 18 forks source link

Wont execute - wrong agent version #80

Closed Jonesie closed 4 years ago

Jonesie commented 4 years ago

Before opening an issue please read this.

Are you reporting a bug or a 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:

Agent:

OS:

Yarn version: *Yarn version**

Node version: *Node version**

sandorfr commented 4 years ago

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.

Jonesie commented 4 years ago

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?

johannwalder commented 4 years ago

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.

sandorfr commented 4 years ago

If you install yarn on your agent (instead of using the yarn installer) adding the capability to your agent is the way to go.

If I remove the demanda from the task, it will remove this need but it will also not prompt people to add what’s necessary so I think I’ll keep the demand.

On Fri 22 May 2020 at 18:59, Johann Walder notifications@github.com wrote:

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.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/geeklearningio/gl-vsts-tasks-yarn/issues/80#issuecomment-632581967, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUJPJXZNPD6T3FAMDYJHADRSY5GVANCNFSM4LSNIYDQ .

Jonesie commented 4 years ago

Seems resolved to me. Thanks