Skip to content

Version 10: Your configFile is invalid cypress.config.ts #22004

@sitefinitysteve

Description

@sitefinitysteve

Current behavior

I can't get by this screen after the cypress UI pops up, everything seemed fine until the config->.ts step.

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: installationIssue during installation or downloading Cypressv10.0.0 🐛Issue present since 10.0.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions