When Setting up Cypress 'configFile is invalid'

The error I get is:

Your configFile is invalid: /Users/mic/Desktop/Projects/MCAT/client/cypress.config.ts

I am simply trying to install cypress on to my project and am having this problem from the get go. I have tried delete and reinstalling package files. I've also tried manipulating tsconfig.json in multiple ways.

Cypress and file tree

package.json

1

1 Answer

Reinstalling by itself will not help you, Cypress sees the old (invalid) config and does not generate the file on the second install.

You must remove the cypress.config.ts file, delete the cypress folder, then reinstall Cypress.

On opening, Cypress will then create a correct cypress.config.ts for you.

Make sure you also have installed typescript before you open Cypress, as it needs to recognize that you want to use typescript.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like