如何在CircleCI Cypress ORB中指定节点版本 [英] How to specify node version in CircleCI Cypress Orb

查看:24
本文介绍了如何在CircleCI Cypress ORB中指定节点版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在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来指定正确的节点版本,但是我还不能确定如何指定以及在哪里指定。

谢谢!

推荐答案

您可以试试

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

这篇关于如何在CircleCI Cypress ORB中指定节点版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆