Skip to content
Discussion options

You must be logged in to vote

A few things to check beyond what was mentioned above:

1. Third-party code or plugins calling Cypress.env() internally

The error says the variable being accessed was undefined, which suggests something is calling Cypress.env() without a specific key — i.e., Cypress.env() with no arguments (which returns all env vars). This could be coming from a plugin, support file, or custom command rather than your own code. Search your entire project including node_modules for common Cypress plugins:

grep -r "Cypress.env()" cypress/ --include="*.ts" --include="*.js"

Also check your support files and any imported libraries.

2. Loading env vars from a JSON file

If you are using cypress.env.json, this fi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@elizakaniewskaevooq
Comment options

Answer selected by elizakaniewskaevooq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants