Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

plugin fails with "Cypress is not defined" when using Typescript #43

Closed
gumieniakm opened this issue Dec 6, 2019 · 1 comment
Closed

Comments

@gumieniakm
Copy link

After installing plugin in a project that uses Cypress e2e tests written in Typescript, Cypress fails with "ReferenceError: Cypress is not defined" in /lib/support.js:3:15
image

Steps to reproduce:
ng new angular-test - empty app
ng add @briebug/cypress-schematic - schematic that installs Typescript support
install cypress-plugin-retries using readme steps: npm install -D cypress-plugin-retries and add require('cypress-plugin-retries') to index.js
npx cypress open fails

I tried adding "cypress-plugin-retries" in compilerOptions -> types in cypress/tsconfig.json but no avail.

I see has index.d.ts in package lib files, but I can't get it to work - is there something I'm missing? Thanks in advance.

@kuceb
Copy link
Owner

kuceb commented Dec 6, 2019

This isn't a typescript error, notice "ReferenceError" and the stack trace.

I believe you've misconfigured the plugin, make sure you require the plugin in the "cypress/support" folder and follow the optional installation instructions after that.

@kuceb kuceb closed this as completed Dec 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants