如何在CircleCI Cypress Orb中指定节点版本

问题描述 投票:0回答:1

[当我尝试在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 [email protected]: 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个回答
0
投票

您可以尝试这个

version: 2.1
orbs:
  cypress: cypress-io/cypress@1
workflows:
  build:
    jobs:
      - cypress/run:
          executor: cypress/base-10
          yarn: true
© www.soinside.com 2019 - 2024. All rights reserved.