APPLITOOLS_API_KEY env variable is missing. It is required to define this variable for Applitools visual tests to run successfully.
Asked
Active
Viewed 824 times
1
-
Are you using this package - https://www.npmjs.com/package/@applitools/eyes-cypress – Alapan Das Nov 01 '21 at 11:00
-
yes, getting the error but. – prabhat saxena Nov 01 '21 at 11:07
1 Answers
1
There are two ways to prevent this.
- Pass the env variable using the CLI like:
export APPLITOOLS_API_KEY=<your_key> npx cypress open
- Create a file in your project root
applitools.config.js
and mention your api key like:
module.exports = {
apiKey: 'YOUR_API_KEY',
// ...
}
In case you don't have any API key, you can refer this article.

Alapan Das
- 17,144
- 3
- 29
- 52
-
-
1That is a good question actually, the OP can try that as well. I followed the plugins page and this is how they are doing it - https://www.npmjs.com/package/@applitools/eyes-cypress – Alapan Das Nov 01 '21 at 14:33
-
1Yep. I think I default to using a `.env` file and adding that file to the `.gitignore`, since then I don't have to worry about keeping a secret in code (option 2) or any terminal _weirdness_ (potentially option 1). Cheers :D – agoff Nov 01 '21 at 14:50