Search code examples
cypressconfige2e-testingconfiguration-filesnpx

Cypress: cypress-cloud configuration can't load due to typscript


I need to run cypress tests locally before figuring them out in Jenkins. The config file I'm wanting to use works properly when I run npm run cypress open --config-file=cypress/config/cypress.test.config.ts --browser chrome --e2e but is not working property when I switch to use the cypress-cloud plugin to make it compatible with the sorry-cypress dashboard (instead of cy2).

Command I've been running: npx cypress-cloud --cloud-config-file cypress/config/cypress.test.config.ts --browser chrome --ci-build-id hello-cypress-cloud02 --spec cypress/e2e/smoke/*

Here's the error I've been receiving in response:

Failed to load config file, falling back to the default config. Attempted locations: [
  'file:///Users/kate/Repos/loon/cypress/config/cypress.test.config.ts'
]

Using debug mode, found out this - currents:config failed loading config file from: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/kate/Repos/loon/cypress/config/cypress.test.config.ts

I can't find anything online about how to make ts work here, it was working previously with cy2... I can't change the files to js at this point, we use them in a lot of places.


Solution

  • Currents and cypress-cloud do not support ts. config files.