【问题标题】:Upgrading NodeJS on SemaphoreCI在 SemaphoreCI 上升级 NodeJS
【发布时间】:2016-08-08 18:15:48
【问题描述】:

我正在使用NodeJS 并通过SemaphoreCI 运行项目。 该项目在我的机器上运行良好,但在 Semaphore 上失败。我怀疑是因为节点版本不同(我的是v5.5,Semaphore使用的是v0.12)。

谷歌给了我somanyresults关于如何升级我的节点,但几乎所有这些都需要sudo访问。我想知道是否有人在 Semaphore 上遇到过类似的问题。

【问题讨论】:

    标签: node.js semaphore-ci


    【解决方案1】:

    Semaphore 为您提供完整的 sudo 访问权限,因此您可以像在开发环境中一样运行任何 linux 命令,这里是来自 the Semaphore docs 的示例。

    您可以find here 在 Semaphore 上预装 NodeJS 版本的完整列表。如您所见,平台上没有5.5 版本,因此您需要在构建过程中使用以下命令安装并切换到它:

    nvm install 5.5
    nvm use 5.5
    

    如果您想使用一些已经预装的版本,您可以使用以下命令:

    nvm use 5.6
    

    【讨论】:

      猜你喜欢
      • 2017-12-10
      • 2018-04-09
      • 2018-09-20
      • 2017-11-29
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 2014-09-03
      • 1970-01-01
      相关资源
      最近更新 更多