Closed delusioninabox closed 2 weeks ago
@delusioninabox Could you share some of the output that shows Node 18.16.1 being used?
@jennifer-shehane Of course!
The spin up environment
step:
Build-agent version 1.0.234836-59bdf2c3 (2024-04-15T14:48:32+0000).
System information:
Server Version: 24.0.9
Storage Driver: overlay2
Backing Filesystem: xfs
Cgroup Driver: cgroupfs
Cgroup Version: 1
Kernel Version: 5.15.0-1053-aws
Operating System: Ubuntu 20.04.6 LTS
OSType: linux
Architecture: x86_64
Starting container cimg/node:18.16.1-browsers
Warning: No authentication provided, using CircleCI credentials for pulls from Docker Hub.
image cache not found on this host, downloading cimg/node:18.16.1-browsers
18.16.1-browsers: Pulling from cimg/node
2ab09b027e7f: Already exists
7b8664c77e57: Already exists
217f1150b17c: Already exists
b67a6a85b221: Already exists
0f829e38bde7: Already exists
44a002a96bdc: Already exists
5546d74a5479: Already exists
4f4fb700ef54: Already exists
613613a13e99: Already exists
6250e3504854: Already exists
4f550f5c419d: Already exists
1792f3d5cbfa: Pull complete
2e3101443624: Pull complete
84508b676d07: Pull complete
Digest: sha256:49903b71aac206cdc489648589909f480a24f178d3274a2979686377f7fbf88c
Status: Downloaded newer image for cimg/node:18.16.1-browsers
cimg/node:18.16.1-browsers:
using image cimg/node@sha256:49903b71aac206cdc489648589909f480a24f178d3274a2979686377f7fbf88c
pull stats: download 173.3MiB in 1.754s (98.74MiB/s), extract 173.3MiB in 5.22s (33.19MiB/s)
time to create container: 3.473s
Time to upload agent and config: 430.218157ms
Time to start containers: 243.35086ms
At the start of the installing NPM packages
step:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package '<<removed>>'
npm WARN EBADENGINE required: { node: '21.5.0', npm: '10.2.5' },
npm WARN EBADENGINE current: { node: 'v18.16.1', npm: '9.5.1' }
npm WARN EBADENGINE }
@delusioninabox
A working example on https://github.com/cypress-io/cypress-realworld-app/blob/develop/.circleci/config.yml is using executors:
instead of executor:
. Does that make any difference if you try that out on your workflow?
version: 2.1
orbs:
cypress: cypress-io/cypress@3.3.1
codecov: codecov/codecov@1.2.3 #
executors:
with-chrome-and-firefox:
docker:
- image: "cypress/browsers:node-20.12.0-chrome-123.0.6312.86-1-ff-124.0.2-edge-123.0.2420.65-1"
resource_class: large
environment:
CYPRESS_coverage: false
Yes, I initially tried with executors
and it didn't work. 😔
executors:
default:
docker:
- image: cypress/browsers:node-20.12.0-chrome-123.0.6312.86-1-ff-124.0.2-edge-123.0.2420.65-1
@MikeMcC399 Yeah that works, although it would be nice to have the option for cypress/run
as well
@TooColline
Yeah that works, although it would be nice to have the option for
cypress/run
as well
Agreed! I added some comment into https://github.com/cypress-io/circleci-orb/issues/468#issuecomment-2227301918 about this.
Thanks y'all! Agreed that an option for cypress/run
would be fantastic. 💯
@TooColline / @delusioninabox
Thanks y'all! Agreed that an option for
cypress/run
would be fantastic. 💯
Cypress is installing all my NPM packages by default with node version 18.16.1. Because of the older version, some of our packages appear to be installing older versions despite being newer versions in our package-lock file. We have a few tests that are flaky in circleci but run reliably locally, and I think they might be related, so I want our Cypress tests in circleci to run on a newer version to see if that resolves some of that inconsistency.
I have tried following the steps in the documentation and alternative configurations, but it runs on 18.16.1 every time regardless. Our setup is also set to work with circleci's "rerun failed tests" and following that documentation, if that matters. I tried different cypress/browsers for the image and had the same result.
Can someone help spot what I'm missing to get this running on a different node version than the default?