Cypress is not defined in plugin file #19272
Unanswered
AnandChandrappa
asked this question in
Plugins
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Am trying to access environment variables in index.ts file under Plugin directory. but cypress would not load and it throws below error message:
ReferenceError: Cypress is not defined
at Object. (/Users/achandrappa/Desktop/Twilio/Code_Repo/Automation/flex-monorepo/packages/flex-ui-e2e/cypress/plugins/index.ts:8:20)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Module.m._compile (/Users/achandrappa/Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/ts-node/src/index.ts:536:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Object.require.extensions. [as .ts] (/Users/achandrappa/Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/ts-node/src/index.ts:539:12)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at runPlugins (/Users/achandrappa/Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_plugins.js:175:15)
at Object. (/Users/achandrappa/Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/index.js:8:25)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Beta Was this translation helpful? Give feedback.
All reactions