accessibility-insights@3 task fails in runtime dependency install

146 views Asked by At

The yaml pipeline has the following tasks added and fails with dependency install.

  • task: YarnInstaller@3 inputs: versionSpec: '1.x'

  • task: accessibility-insights@3 inputs: hostingMode: 'staticSite' staticSiteDir: '$(Build.SourcesDirectory)\out\release\ProjectPkg\Code\wwwroot' singleWorker: true uploadOutputArtifact: true failOnAccessibilityError: true

enter image description here

1

There are 1 answers

7
Katy On BEST ANSWER

The Accessibility Insights for Azure DevOps Extension v3 requires Node 16 to run. As part of our extension, we set a minimumAgentVersion variable that forces ADO to use an agent running Node 16 by default.

I see in the log that the pipeline is using NODE_MODULE_VERSION 72 (Node 6) when it expects NODE_MODULE_VERSION 93 (Node 16). Is there a task before this one that is setting the Node version? If so, you may be able to remove the task that installs Node 6 and use the Node 16 environment that will come as the default on the agent version forced by the Accessibility Insights task.

If this doesn’t work, you can try adding a task, like Node.js Tool Installer, to re-install Node 16 before the Accessibility Insights task runs:

- task: NodeTool@0
  inputs:
    versionSpec: '16.x'