2

我有一个使用 Cypress 和 Percy 的 Nextjs 应用程序。最初,我只设置了赛普拉斯。我正在使用 Cypress 7.5.0 版和 netlify-plugin-cypress。这两件事一起工作正常,构建成功部署。

但是,当我介绍 Percy 时,构建中断并出现以下错误:

找不到 Cypress 测试运行结果​</p>

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

为了清楚起见,带有错误的部署日志图片:Netlify 部署日志错误消息指的是 netlify-plugin-cypress 中断

我按照本指南https://docs.percy.io/docs/cypress设置 Percy

我是否遗漏了一些东西来配置 Percy 在 Netlify 中工作?出于某种原因,它与插件不兼容吗?

任何帮助了解此错误的底部将不胜感激!

4

0 回答 0