ReferenceError: Cypress is not defined
See original GitHub issueI tried adding this plugin to my Cypress project after discovering console.log did not print as expected, following the instructions in the README on latest version of Cypress (4.8.0), and I get this error when trying to run tests:
We invoked the function exported by `/root/project/web-integration-tests/cypress/plugins/index.js`, but it threw an error.
ReferenceError: Cypress is not defined
at collectBrowserConsoleLogs (/root/project/web-integration-tests/node_modules/cypress-terminal-report/src/installLogsCollector.js:147:3)
at installLogsCollector (/root/project/web-integration-tests/node_modules/cypress-terminal-report/src/installLogsCollector.js:45:3)
at module.exports (/root/project/web-integration-tests/cypress/plugins/index.js:25:62)
at /root/.cache/Cypress/4.3.0/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:75:12
at tryCatcher (/root/.cache/Cypress/4.3.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Function.Promise.attempt.Promise.try (/root/.cache/Cypress/4.3.0/Cypress/resources/app/packages/server/node_modules/bluebird/js/release/method.js:39:29)
at load (/root/.cache/Cypress/4.3.0/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:72:7)
at EventEmitter.<anonymous> (/root/.cache/Cypress/4.3.0/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js:196:5)
at EventEmitter.emit (events.js:210:5)
at process.<anonymous> (/root/.cache/Cypress/4.3.0/Cypress/resources/app/packages/server/lib/plugins/util.js:25:29)
at process.emit (events.js:210:5)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
Top Results From Across the Web
ReferenceError: `Cypress` is not defined · Issue #77 - GitHub
Trying to start this via codesandbox (to fiddle around) I get this error right out the gate: ReferenceError Cypress is not defined evaluate ......
Read more >ESLint: 'cy' is not defined (Cypress) - Stack Overflow
It runs in Cypress just fine. But I get Typescript errors in Webstorm, saying that cy is not defined (a TS and ESlint...
Read more >cypress-io/cypress - Gitter
Hi , I am getting the error "Reference Error :cy is not defined". TEST CODE: Describe('The Login', function () { beforeEach(function () {...
Read more >ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >Error Messages | Cypress Documentation
This message means that Cypress was unable to find tests in the specified file. You'll likely get this message if you have an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@archfz I just checked the test and found it’s the
Readme.md’s problem. The plugin path and the support path is opposite in that file.After switched it, problem solved.
Thanks @archfz It’s runs correctly. I reinstalled all modules and it runs correctly.