简体   繁体   中英

Azure devops pipeline is throwing error installing node js

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://docs.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

You have wrong characters '

Please use this '

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM