1

I am creating an Azure Devops pipleline , here is my pipeline -

pool:
  vmImage: ubuntu 16.04

steps:
- task: NodeTool@0  
  inputs:
    versionSpec: ‘14.x’
  displayName: ‘TASK | Install Node.js 14.x ’

But I am getting following error -

Starting: ‘TASK | Install Node.js 14.x ’
==============================================================================
Task         : Node.js tool installer
Description  : Finds or downloads and caches the specified version spec of Node.js and adds it to the PATH
Version      : 0.186.0
Author       : Microsoft Corporation
Help         : https://learn.microsoft.com/azure/devops/pipelines/tasks/tool/node-js
==============================================================================
Downloading: https://nodejs.org/dist/v0.9.0/node-v0.9.0-linux-x64.tar.gz
Downloading: https://nodejs.org/dist/v0.9.0/win-x64/node.exe
Downloading: https://nodejs.org/dist/v0.9.0/node.exe
Downloading: https://nodejs.org/dist/v0.9.0/node.lib
Caching tool: node 0.9.0 x64

[error]Directory does not exist: /opt/hostedtoolcache/node/0.9.0/x64/bin

Finishing: ‘TASK | Install Node.js 14.x ’

Not sure whats going wrong here. I have tested the same with versionSpec : 12.x, 10.x etc, but no luck

1 Answer 1

3

You have wrong characters

Please use this '

  - task: NodeTool@0  
    inputs:
      versionSpec: '14.x'
    displayName: 'TASK | Install Node.js 14.x '
Sign up to request clarification or add additional context in comments.

2 Comments

I don't think that is the issue since in my editor the character is ', that might have been placed wrong while copying to StackOverFlow
Well, I copy posted your code and I got the same error. Changed characters and it is ok now. Give a try and check on your own. Just copy paste mine code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.