Testing 参考错误';未定义流程';在执行Cypress测试时

Testing 参考错误';未定义流程';在执行Cypress测试时,testing,cypress,Testing,Cypress,尝试执行任何测试都会导致出现此错误 我正在使用Cypress 6.5.0 真的不知道该怎么办 很抱歉看到了这张图片,但这样显示要好得多。 还有StackTrace at Object../node_modules/is-ci/node_modules/ci-info/index.js (webpack:///node_modules/is-ci/node_modules/ci-info/index.js:5:1) at __webpack_require__ (webpack:///webpa

尝试执行任何测试都会导致出现此错误

我正在使用Cypress 6.5.0

真的不知道该怎么办

很抱歉看到了这张图片,但这样显示要好得多。

还有StackTrace

at Object../node_modules/is-ci/node_modules/ci-info/index.js (webpack:///node_modules/is-ci/node_modules/ci-info/index.js:5:1)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
at Object../node_modules/is-ci/index.js (webpack:///node_modules/is-ci/index.js:3:18)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
at Object.eval (webpack:///node_modules/cypress/lib/util.js:21:14)
at Object../node_modules/cypress/lib/util.js (http://localhost:37869/__cypress/tests?p=test/e2e/support/index.js:87250:31)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
at Object.eval (webpack:///node_modules/cypress/index.js:9:14)
at Object../node_modules/cypress/index.js (http://localhost:37869/__cypress/tests?p=test/e2e/support/index.js:82972:31)
at __webpack_require__ (webpack:///webpack/bootstrap:19:1)
From previous event:
at runScriptsFromUrls (http://localhost:37869/__cypress/runner/cypress_runner.js:177985:98)
at Object.runScripts (http://localhost:37869/__cypress/runner/cypress_runner.js:177999:11)
at $Cypress.onSpecWindow (http://localhost:37869/__cypress/runner/cypress_runner.js:167733:19)

当我在测试中导入cypress时就发生了这种情况,删除了它,修复了这个问题

有时由于错误,Visual Studio代码会自动导入不必要的库。你应该删除它们。对我来说是


从“cypress”导入{cli}

看起来您在
/support/index.js
中有一些东西(因为它在堆栈跟踪中提到过)应该在
/plugins/index.js
中(因为它对
进程
的使用无效,只有在node.js中才可用)

Cypress同时运行浏览器进程和后台node.js进程

/support/index.js
用于增强浏览器进程,而
/plugins/index.js
用于增强node.js进程

如果在添加库、任务或文件预处理器时将它们混在一起,则会出现所显示类型的错误

/support/index.js
中有什么内容