cypress: Version 10: Your configFile is invalid cypress.config.ts
Current behavior
I can’t get by this screen after the cypress UI pops up, everything seemed fine until the config->.ts step.

Error
Your configFile is invalid: C:\Github\Project\cypress.config.ts
It threw an error when required, check the stack trace below:
[Stack trace](http://localhost:22331/__launchpad/index.html#)
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:371:5)
at throwIfUnsupportedURLProtocol (node:internal/modules/esm/resolve:1033:11)
at defaultResolve (node:internal/modules/esm/resolve:1103:3)
at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
at ESMLoader.import (node:internal/modules/esm/loader:332:22)
at importModuleDynamically (node:internal/modules/cjs/loader:1042:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:437:21)
at importModuleDynamically (node:vm:381:46)
at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
at loadFile (C:\Users\steve\AppData\Local\Cypress\Cache\10.0.0\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js:126:9)
at EventEmitter. (C:\Users\steve\AppData\Local\Cypress\Cache\10.0.0\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js:136:38)
at EventEmitter.emit (node:events:520:28)
at EventEmitter.emit (node:domain:475:12)
at process. (C:\Users\steve\AppData\Local\Cypress\Cache\10.0.0\Cypress\resources\app\node_modules\@packages\server\lib\plugins\util.js:33:22)
at process.emit (node:events:520:28)
import { defineConfig } from 'cypress'
export default defineConfig({
projectId: 'nqoyvw',
viewportWidth: 1480,
viewportHeight: 1260,
video: false,
videosFolder: 'cypress/videos',
screenshotsFolder: 'cypress/screenshots',
pageLoadTimeout: 60000,
requestTimeout: 45000,
responseTimeout: 45000,
experimentalStudio: true,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'https://dev.project.ca',
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
})
Debug logs
No response
Cypress Version
10
Package Manager
npm
Operating system
Windows
Other
Node: v16.14.0 tsc: Version 4.0.2
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 17 (7 by maintainers)
Commits related to this issue
- fix: partial fix for #21997 & #22004, throw the originalError — committed to cypress-io/cypress by tgriesser 2 years ago
- fix: partial fix for #21997 & #22004, throw the originalError (#22009) * fix: partial fix for #21997 & #22004, throw the originalError * throw originalError test Co-authored-by: Zach Bloomquist... — committed to cypress-io/cypress by tgriesser 2 years ago
Hmm, no, now I’m getting
@sitefinitysteve in that case, can you try changing
cypress.config.ts->cypress.config.jsand changeto
see if you’re able to continue? We’ll be updating the logic to better manage TypeScript detection in the meantime