【问题标题】:How to specify node version in CircleCI Cypress Orb如何在 CircleCI Cypress Orb 中指定节点版本
【发布时间】:2019-09-06 06:59:12
【问题描述】:

当我尝试在 CircleCI 中使用 Cypress Orb 时,我收到一条错误消息,提示我使用了错误的节点版本。

我已经尝试了多个不同的配置,无论是否使用 Orb,都没有成功。

这是我直接从文档中复制的非常基本的 config.yml 文件

version: 2.1
orbs:
  cypress: cypress-io/cypress@1
workflows:
  build:
    jobs:
      - cypress/run:
          yarn: true

这是 CircleCI 显示的错误

#!/bin/bash -eo pipefail
yarn install --frozen-lockfile
yarn install v1.10.1
[1/5] Validating package.json...
error app@1.0.0: The engine "node" is incompatible with this module. Expected version "^10.15.1". Got "10.13.0"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exited with code 1

我怀疑我必须使用 nvm 来指定正确的节点版本,但我无法弄清楚如何或在哪里。

谢谢!

【问题讨论】:

    标签: cypress circleci


    【解决方案1】:

    你可以试试这个

    version: 2.1
    orbs:
      cypress: cypress-io/cypress@1
    workflows:
      build:
        jobs:
          - cypress/run:
              executor: cypress/base-10
              yarn: true
    

    【讨论】:

      猜你喜欢
      • 2020-12-13
      • 2019-08-25
      • 1970-01-01
      • 2022-01-17
      • 2021-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-08
      相关资源
      最近更新 更多