I am trying to run some Cypress tests in a Github Actions pipeline.
Here is some of my YAML file:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
When I run this pipeline, I get this error:
npm ci
shell: /usr/bin/bash -e {0}
npm ERR! Cannot read property 'cypress' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2024-05-08T19_32_38_289Z-debug.log
Here is my package.json
:
{
"scripts": {
"test": "cypress run"
},
"dependencies": {
"cypress": "^13.9.0"
}
}