node.js - Azure Devops 管道在安装 Node js 时抛出错误

标签 node.js azure azure-devops yaml azure-pipelines

我正在创建一个 Azure Devops 管道,这是我的管道 -

pool:
  vmImage: ubuntu 16.04

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

但是我收到以下错误 -

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 ’

不确定这里出了什么问题。我已经用 versionSpec 进行了相同的测试:12.x、10.x 等,但没有运气

最佳答案

您输入了错误的字符'

请使用此'

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

关于node.js - Azure Devops 管道在安装 Node js 时抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67522173/

相关文章:

javascript - 子域名无法使用 express-vhost

azure - 服务结构FABRIC_E_IMAGEBUILDER_VALIDATION_ERROR : DOWNLOAD PATH SANITIZED Error

php - 从 Azure 网站中的 Blob 存储获取损坏的图像

适用于 Java 的 Azure Application Insights 代理导致无法在 JBoss 18 上找到或加载主类 %JAVA_OPTS

javascript - 在 Nodejs 中管理大量回调递归

node.js - Heroku、node.js、服务器崩溃并出现错误 : Most middleware (like logger) is no longer bundled with Express and must be installed separately

javascript - socket.io聊天示例代码中fn()的含义

Azure Functions 部署源 Visual Studio Team Service 项目

azure - 需要在 azure 逻辑应用程序中使用表达式才能获取 JSON 元素

azure - 完成所有依赖管道 yaml 后触发管道