Netlify build is breaking because of netlify-plugin-cypress when Percy is introduced

562 Views Asked by At

I have a Nextjs application that is using Cypress and Percy. Initially, I only had Cypress set up. I am using Cypress version 7.5.0, and the netlify-plugin-cypress. Together those two things worked fine and the build was successfully deployed.

However, when I introduced Percy, the build breaks with the following error:

Could not find Cypress test run results ​

3:05:36 PM: ────────────────────────────────────────────────────────────────
3:05:36 PM:   Plugin "netlify-plugin-cypress" failed                        
3:05:36 PM: ────────────────────────────────────────────────────────────────
3:05:36 PM: ​
3:05:36 PM:   Error message
3:05:36 PM:   Error: Problem running Cypress
3:05:36 PM:   Could not find Cypress test run results
3:05:36 PM: ​
3:05:36 PM:   Plugin details
3:05:36 PM:   Package:        netlify-plugin-cypress
3:05:36 PM:   Version:        2.2.0
3:05:36 PM:   Repository:     git+https://github.com/cypress-io/netlify-plugin-cypress.git
3:05:36 PM:   npm link:       https://www.npmjs.com/package/netlify-plugin-cypress
3:05:36 PM:   Report issues:  https://github.com/cypress-io/netlify-plugin-cypress/issues
3:05:36 PM: ​
3:05:36 PM:   Error location
3:05:36 PM:   In "onPostBuild" event in "netlify-plugin-cypress" from netlify.toml and package.json
3:05:36 PM:       at processCypressResults (/node_modules/netlify-plugin-cypress/src/utils.js:197:14)
3:05:36 PM:       at postBuild (/node_modules/netlify-plugin-cypress/src/onPostBuild.js:81:3)
3:05:36 PM:       at async module.exports (/node_modules/netlify-plugin-cypress/src/onPostBuild.js:123:3)
3:05:36 PM: ​
3:05:36 PM:   Resolved config
3:05:36 PM:   build:
3:05:36 PM:     command: npm run ci
3:05:36 PM:     commandOrigin: config
3:05:36 PM:     environment:
3:05:36 PM:       - CYPRESS_CACHE_FOLDER
3:05:36 PM:       - TERM
3:05:36 PM:       - PERCY_TOKEN
3:05:36 PM:       - CYPRESS_RECORD_KEY
3:05:36 PM:     publish: /opt/build/repo/out
3:05:36 PM:   functions:
3:05:36 PM:     '*': {}
3:05:36 PM:   plugins:
3:05:36 PM:     - inputs:
3:05:36 PM:         enable: false
3:05:36 PM:         record: true
3:05:36 PM:       origin: config
3:05:36 PM:       package: netlify-plugin-cypress
3:05:36 PM:     - inputs: {}
3:05:36 PM:       origin: config
3:05:36 PM:       package: '@netlify/plugin-lighthouse'
3:05:36 PM:     - inputs: {}
3:05:36 PM:       origin: config
3:05:36 PM:       package: '@netlify/plugin-nextjs'
3:05:36 PM:   redirects:
3:05:36 PM:     - force: true
3:05:36 PM:       from: /_error
3:05:36 PM:       to: /error
3:05:36 PM:     - from: /dummy
3:05:36 PM:       to: /browse/m/track/day-dreamer_1026343
3:10:05 PM: Canceling deploy

Picture of deploy log with error for clarity: Netlify deploy log error message referring to netlify-plugin-cypress breaking

I set up Percy following this guide https://docs.percy.io/docs/cypress

Am I missing something to configure Percy to work in Netlify? Does it just not play nice with the plugin for some reason?

Any help getting to the bottom of this error would be appreciated!

0

There are 0 best solutions below