Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your configFile is invalid with Node.js 22.12.0 #30715

Closed
fredrik-jansson-se opened this issue Dec 4, 2024 · 16 comments · Fixed by #30730
Closed

Your configFile is invalid with Node.js 22.12.0 #30715

fredrik-jansson-se opened this issue Dec 4, 2024 · 16 comments · Fixed by #30730

Comments

@fredrik-jansson-se
Copy link

fredrik-jansson-se commented Dec 4, 2024

Current behavior

./node_modules/.bin/cypress run -C cypress/cypress.config.ts

DevTools listening on ws://127.0.0.1:63094/devtools/browser/53e3238c-950e-4a0f-8042-3c35b7e18d63
(node:78723) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/ts-node/esm/transpile-only.mjs", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:78723) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(node:78723) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts

It threw an error when required, check the stack trace below:

{}

Desired behavior

Cypress should run

Test code to reproduce

import { defineConfig } from 'cypress';
import fs from 'fs';

export default defineConfig({
        viewportWidth: 1440,
        viewportHeight: 900,
        defaultCommandTimeout: 10000,

        retries: {
                runMode: 0
        },
        env: {
                site_provider_username: '[email protected]',
                site_provider_password: 'verysecret',
                tenant_username: '[email protected]',
                tenant_password: 'verysecret',
                ttl_5_sec_username: '[email protected]',
                ttl_5_sec_password: 'verysecret'
        },
        video: false,
        e2e: {
                testIsolation: true,
                baseUrl: 'https://localhost:50080',
                setupNodeEvents(on, config) {
                        on('after:spec', (_spec: Cypress.Spec, results: CypressCommandLine.RunResult) => {
                                if (results && results.video) {
                                        // Do we have failures for any retry attempts?
                                        const failures = results.tests.some(test => test.attempts.some(attempt => attempt.state === 'failed'));
                                        if (!failures) {
                                                // delete the video if the spec passed and no tests retried
                                                fs.unlinkSync(results.video);
                                        }
                                }
                        });
                        return config;
                }
        }
});

Cypress Version

13.16.0

Node version

v20.12.2

Operating System

macOS 15.1.1

Debug Logs

> [email protected] cy:run
> cypress run -C cypress/cypress.config.ts

2024-12-04T16:51:17.809Z cypress:cli:cli cli starts with arguments ["/Users/frja/.nvm/versions/node/v20.12.2/bin/node","/Users/frja/dev/control-tower/node_modules/.bin/cypress","run","-C","cypress/cypress.config.ts"]
2024-12-04T16:51:17.810Z cypress:cli NODE_OPTIONS is not set
2024-12-04T16:51:17.810Z cypress:cli:cli program parsing arguments
2024-12-04T16:51:17.812Z cypress:cli:cli running Cypress with args [ Command { _events: [Object: null prototype] { 'option:auto-cancel-after-failures': [Function (anonymous)], 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:component': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:e2e': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:quiet': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:runner-ui': [Function (anonymous)], 'option:no-runner-ui': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 25, _maxListeners: undefined, commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], parent: Command { _events: [Object: null prototype], _eventsCount: 1, _maxListeners: undefined, commands: [Array], options: [Array], parent: null, _allowUnknownOption: false, _args: [], rawArgs: [Array], _scriptPath: '/Users/frja/dev/control-tower/node_modules/.bin/cypress', _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _storeOptionsAsPropertiesCalled: true, _passCommandToAction: true, _actionResults: [], _actionHandler: null, _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _combineFlagAndOptionalValue: true, _hidden: false, _hasHelpOption: true, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: undefined, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '<command> [options]', args: [Array], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, _allowUnknownOption: false, _args: [], rawArgs: null, _scriptPath: null, _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _storeOptionsAsPropertiesCalled: false, _passCommandToAction: true, _actionResults: [], _actionHandler: [Function: listener], _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _combineFlagAndOptionalValue: true, _hidden: false, _hasHelpOption: true, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: 0, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, exit: true, configFile: 'cypress/cypress.config.ts', args: [], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false } ]
2024-12-04T16:51:17.848Z cypress:cli:cli variable-length opts parsed { args: [ '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', '/Users/frja/dev/control-tower/node_modules/.bin/cypress', 'run', '-C', 'cypress/cypress.config.ts' ], opts: Command { _events: [Object: null prototype] { 'option:auto-cancel-after-failures': [Function (anonymous)], 'option:browser': [Function (anonymous)], 'option:ci-build-id': [Function (anonymous)], 'option:component': [Function (anonymous)], 'option:config': [Function (anonymous)], 'option:config-file': [Function (anonymous)], 'option:e2e': [Function (anonymous)], 'option:env': [Function (anonymous)], 'option:group': [Function (anonymous)], 'option:key': [Function (anonymous)], 'option:headed': [Function (anonymous)], 'option:headless': [Function (anonymous)], 'option:no-exit': [Function (anonymous)], 'option:parallel': [Function (anonymous)], 'option:port': [Function (anonymous)], 'option:project': [Function (anonymous)], 'option:quiet': [Function (anonymous)], 'option:record': [Function (anonymous)], 'option:reporter': [Function (anonymous)], 'option:runner-ui': [Function (anonymous)], 'option:no-runner-ui': [Function (anonymous)], 'option:reporter-options': [Function (anonymous)], 'option:spec': [Function (anonymous)], 'option:tag': [Function (anonymous)], 'option:dev': [Function (anonymous)] }, _eventsCount: 25, _maxListeners: undefined, commands: [], options: [ [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option], [Option] ], parent: Command { _events: [Object: null prototype], _eventsCount: 1, _maxListeners: undefined, commands: [Array], options: [Array], parent: null, _allowUnknownOption: false, _args: [], rawArgs: [Array], _scriptPath: '/Users/frja/dev/control-tower/node_modules/.bin/cypress', _name: 'cypress', _optionValues: {}, _storeOptionsAsProperties: true, _storeOptionsAsPropertiesCalled: true, _passCommandToAction: true, _actionResults: [], _actionHandler: null, _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _combineFlagAndOptionalValue: true, _hidden: false, _hasHelpOption: true, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: undefined, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '<command> [options]', args: [Array], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, _allowUnknownOption: false, _args: [], rawArgs: null, _scriptPath: null, _name: 'run', _optionValues: {}, _storeOptionsAsProperties: true, _storeOptionsAsPropertiesCalled: false, _passCommandToAction: true, _actionResults: [], _actionHandler: [Function: listener], _executableHandler: false, _executableFile: null, _defaultCommandName: null, _exitCallback: null, _aliases: [], _combineFlagAndOptionalValue: true, _hidden: false, _hasHelpOption: true, _helpFlags: '-h, --help', _helpDescription: 'display help for command', _helpShortFlag: '-h', _helpLongFlag: '--help', _hasImplicitHelpCommand: 0, _helpCommandName: 'help', _helpCommandnameAndArgs: 'help [command]', _helpCommandDescription: 'display help for command', _usage: '[options]', _description: 'Runs Cypress tests from the CLI without the GUI', _argsDescription: undefined, exit: true, configFile: 'cypress/cypress.config.ts', args: [], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false } }
2024-12-04T16:51:17.849Z cypress:cli parsed cli options { configFile: 'cypress/cypress.config.ts' }
2024-12-04T16:51:17.849Z cypress:cli verifying Cypress app
2024-12-04T16:51:17.849Z cypress:cli checking environment variables
2024-12-04T16:51:17.850Z cypress:cli checking if executable exists /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress
2024-12-04T16:51:17.851Z cypress:cli Binary is executable? : true
2024-12-04T16:51:17.851Z cypress:cli binaryDir is  /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app
2024-12-04T16:51:17.851Z cypress:cli Reading binary package.json from: /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/package.json
2024-12-04T16:51:17.853Z cypress:cli Found binary version 13.16.0 installed in: /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app
2024-12-04T16:51:17.853Z cypress:cli { verified: true }
2024-12-04T16:51:17.853Z cypress:cli is Verified ? true
2024-12-04T16:51:17.853Z cypress:cli:run processing run options { configFile: 'cypress/cypress.config.ts', key: null, spec: null, reporter: null, reporterOptions: null, project: '/Users/frja/dev/control-tower' }
2024-12-04T16:51:17.854Z cypress:cli:run --key is not set, looking up environment variable CYPRESS_RECORD_KEY
2024-12-04T16:51:17.854Z cypress:cli:run run to spawn.start args ["--run-project","/Users/frja/dev/control-tower","--config-file","cypress/cypress.config.ts"]
2024-12-04T16:51:17.854Z cypress:cli needs to start own Xvfb? false
2024-12-04T16:51:17.854Z cypress:cli spawning, should retry on display problem? false
2024-12-04T16:51:17.856Z cypress:cli spawn args [ '--no-sandbox', '--', '--run-project', '/Users/frja/dev/control-tower', '--config-file', 'cypress/cypress.config.ts', '--cwd', '/Users/frja/dev/control-tower', '--userNodePath', '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', '--userNodeVersion', '20.12.2' ] { detached: false, stdio: [ 'inherit', 'inherit', 'pipe' ] }
2024-12-04T16:51:17.856Z cypress:cli spawning Cypress with executable: /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress
2024-12-04T16:51:17.858Z cypress:cli piping child STDERR to process STDERR
2024-12-04T16:51:18.109Z cypress:snapshot:info Caching 3385, defining 4228 modules! Using cache
2024-12-04T16:51:18.109Z cypress:snapshot:debug initializing packherd require
2024-12-04T16:51:18.206Z cypress:server:performance-benchmark elapsed time at v8-snapshot-startup-time: 100.823ms
2024-12-04T16:51:18.236Z cypress:server:appdata path: /Users/frja/Library/Application Support/Cypress/cy/production/browsers
2024-12-04T16:51:18.237Z cypress:server appending default switches for electron: [
  { name: '--test-type' },
  { name: '--ignore-certificate-errors' },
  { name: '--start-maximized' },
  { name: '--silent-debugger-extension-api' },
  { name: '--no-default-browser-check' },
  { name: '--no-first-run' },
  { name: '--noerrdialogs' },
  { name: '--enable-fixed-layout' },
  { name: '--disable-popup-blocking' },
  { name: '--disable-password-generation' },
  { name: '--disable-single-click-autofill' },
  { name: '--disable-prompt-on-repos' },
  { name: '--disable-background-timer-throttling' },
  { name: '--disable-renderer-backgrounding' },
  { name: '--disable-renderer-throttling' },
  { name: '--disable-backgrounding-occluded-windows' },
  { name: '--disable-restore-session-state' },
  { name: '--disable-new-profile-management' },
  { name: '--disable-new-avatar-menu' },
  { name: '--allow-insecure-localhost' },
  { name: '--reduce-security-for-testing' },
  { name: '--enable-automation' },
  { name: '--disable-print-preview' },
  { name: '--disable-component-extensions-with-background-pages' },
  { name: '--disable-device-discovery-notifications' },
  { name: '--autoplay-policy', value: 'no-user-gesture-required' },
  { name: '--disable-site-isolation-trials' },
  { name: '--metrics-recording-only' },
  { name: '--disable-prompt-on-repost' },
  { name: '--disable-hang-monitor' },
  { name: '--disable-sync' },
  { name: '--disable-web-resources' },
  { name: '--safebrowsing-disable-download-protection' },
  { name: '--disable-client-side-phishing-detection' },
  { name: '--disable-component-update' },
  {
    name: '--simulate-outdated-no-au',
    value: "'Tue, 31 Dec 2099 23:59:59 GMT'"
  },
  { name: '--disable-default-apps' },
  {
    name: '--disable-features',
    value: 'Translate,PrivacySandboxSettings4'
  },
  { name: '--use-fake-ui-for-media-stream' },
  { name: '--use-fake-device-for-media-stream' },
  { name: '--disable-ipc-flooding-protection' },
  { name: '--disable-backgrounding-occluded-window' },
  { name: '--disable-breakpad' },
  { name: '--password-store', value: 'basic' },
  { name: '--use-mock-keychain' },
  { name: '--disable-dev-shm-usage' },
  { name: '--enable-precise-memory-info' }
]
2024-12-04T16:51:18.238Z cypress:server:cypress starting cypress with argv [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--', '--run-project', '/Users/frja/dev/control-tower', '--config-file', 'cypress/cypress.config.ts', '--cwd', '/Users/frja/dev/control-tower', '--userNodePath', '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', '--userNodeVersion', '20.12.2' ]
2024-12-04T16:51:18.238Z cypress:server:args argv array: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--run-project', '/Users/frja/dev/control-tower', '--config-file', 'cypress/cypress.config.ts', '--cwd', '/Users/frja/dev/control-tower', '--userNodePath', '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', '--userNodeVersion', '20.12.2' ]
2024-12-04T16:51:18.239Z cypress:server:args parsed argv options { options: { _: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, 'run-project': '/Users/frja/dev/control-tower', runProject: '/Users/frja/dev/control-tower', 'config-file': 'cypress/cypress.config.ts', configFile: 'cypress/cypress.config.ts', cwd: '/Users/frja/dev/control-tower', userNodePath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', userNodeVersion: '20.12.2' } }
2024-12-04T16:51:18.243Z cypress:server:args argv parsed: { _: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, runProject: '/Users/frja/dev/control-tower', configFile: 'cypress/cypress.config.ts', cwd: '/Users/frja/dev/control-tower', userNodePath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', userNodeVersion: '20.12.2', invokedFromCli: true }
2024-12-04T16:51:18.243Z cypress:server:util:proxy found proxy environment variables { npm_config_noproxy: '' }
2024-12-04T16:51:18.243Z cypress:server:args options { _: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, runProject: '/Users/frja/dev/control-tower', configFile: 'cypress/cypress.config.ts', cwd: '/Users/frja/dev/control-tower', userNodePath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', userNodeVersion: '20.12.2', invokedFromCli: true, config: {} }
2024-12-04T16:51:18.243Z cypress:server:args argv options: { _: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, runProject: '/Users/frja/dev/control-tower', configFile: 'cypress/cypress.config.ts', cwd: '/Users/frja/dev/control-tower', userNodePath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', userNodeVersion: '20.12.2', invokedFromCli: true, config: {}, projectRoot: '/Users/frja/dev/control-tower' }
2024-12-04T16:51:18.243Z cypress:server:cypress from argv [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress', '--no-sandbox', '--run-project', '/Users/frja/dev/control-tower', '--config-file', 'cypress/cypress.config.ts', '--cwd', '/Users/frja/dev/control-tower', '--userNodePath', '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', '--userNodeVersion', '20.12.2' ] got options { _: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, runProject: '/Users/frja/dev/control-tower', configFile: 'cypress/cypress.config.ts', cwd: '/Users/frja/dev/control-tower', userNodePath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', userNodeVersion: '20.12.2', invokedFromCli: true, config: {}, projectRoot: '/Users/frja/dev/control-tower' }
2024-12-04T16:51:18.244Z cypress:server:cypress scaling electron app in headless mode
2024-12-04T16:51:18.254Z cypress:server:appdata path: /Users/frja/Library/Application Support/Cypress/cy/production

DevTools listening on ws://127.0.0.1:63284/devtools/browser/8e153385-3186-4a25-bcaf-bdc14cd1a07a
2024-12-04T16:51:18.279Z cypress:server:cypress starting in mode run with options { _: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/MacOS/Cypress' ], sandbox: false, runProject: '/Users/frja/dev/control-tower', configFile: 'cypress/cypress.config.ts', cwd: '/Users/frja/dev/control-tower', userNodePath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node', userNodeVersion: '20.12.2', invokedFromCli: true, config: {}, projectRoot: '/Users/frja/dev/control-tower' }
2024-12-04T16:51:18.279Z cypress:server:cypress running Electron currently
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudLatestRunUpdateSpecData
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudProjectBySlug
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudProjectsBySlugs
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudSpecByPath
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.cloudViewer
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.pollingIntervals
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for Query.versions
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for CurrentProject.cloudProject
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for RelevantRunInfo.status
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for RemoteFetchableCloudProjectResult.data
Wed, 04 Dec 2024 16:51:18 GMT cypress:graphql:nexusDeferIfNotLoadedPlugin Adding nexusDeferIfNotLoadedPlugin for RemoteFetchableCloudProjectSpecResult.data
2024-12-04T16:51:18.323Z cypress:server:browsers:utils getBrowsers
2024-12-04T16:51:18.323Z cypress:launcher:detect detecting if the following browsers are present [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', versionRegex: /Google Chrome (\S+)/m, binary: [ 'google-chrome', 'chrome', 'google-chrome-stable' ], minSupportedVersion: 64 }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', versionRegex: /Chromium (\S+)/m, binary: [ 'chromium-browser', 'chromium' ], minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'beta', displayName: 'Chrome Beta', versionRegex: /Google Chrome (\S+) beta/m, binary: 'google-chrome-beta', minSupportedVersion: 64 }, { name: 'chrome', family: 'chromium', channel: 'canary', displayName: 'Canary', versionRegex: /Google Chrome Canary (\S+)/m, binary: 'google-chrome-canary', minSupportedVersion: 64 }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', versionRegex: /^Mozilla Firefox ([^\sab]+)$/m, binary: 'firefox', minSupportedVersion: 86, validator: [Function: validator] }, { name: 'firefox', family: 'firefox', channel: 'dev', displayName: 'Firefox Developer Edition', versionRegex: /^Mozilla Firefox (\S+b\S*)$/m, binary: [ 'firefox-developer-edition', 'firefox' ], minSupportedVersion: 86 }, { name: 'firefox', family: 'firefox', channel: 'nightly', displayName: 'Firefox Nightly', versionRegex: /^Mozilla Firefox (\S+a\S*)$/m, binary: [ 'firefox-nightly', 'firefox-trunk' ], minSupportedVersion: 86 }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', versionRegex: /Microsoft Edge (\S+)/im, binary: [ 'edge', 'microsoft-edge' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'canary', displayName: 'Edge Canary', versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/im, binary: [ 'edge-canary', 'microsoft-edge-canary' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'beta', displayName: 'Edge Beta', versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/im, binary: [ 'edge-beta', 'microsoft-edge-beta' ], minSupportedVersion: 79 }, { name: 'edge', family: 'chromium', channel: 'dev', displayName: 'Edge Dev', versionRegex: /Microsoft Edge.+?(\S*(?= dev)|(?<=dev )\S*)/im, binary: [ 'edge-dev', 'microsoft-edge-dev' ], minSupportedVersion: 79 } ]
2024-12-04T16:51:18.324Z cypress:server:browsers:utils WebKit is enabled, but there was an error constructing the WebKit browser: { err: Error: Cannot find module 'playwright-webkit' Require stack: - /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/utils.ts at node:internal/modules/cjs/loader:1084:15 at Function._resolveFilename (node:electron/js2c/browser_init:2:116118) at resolve (node:internal/modules/cjs/helpers:127:19) at Function.resolve (evalmachine.<anonymous>:1:759290) at P (<embedded>:2793:103503) at Object.I [as getBrowsers] (<embedded>:2793:104338) at b.machineBrowsers (<embedded>:2211:76158) at T._setCurrentProject (<embedded>:2590:67968) at new T (<embedded>:2590:60457) at new S (<embedded>:2590:122608) at N (<embedded>:3028:42703) at s.exports (<embedded>:3028:100585) at <embedded>:3035:3280 at tryCatcher (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/util.js:16:23) at Function.<anonymous> (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/method.js:39:29) at Object.runElectron (<embedded>:3035:3050) at Object.startInMode (<embedded>:3035:5738) at <embedded>:3035:4826 at tryCatcher (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:638:18) at PromiseArray._resolve (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise_array.js:126:19) at PromiseArray._promiseFulfilled (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise_array.js:144:14) at Promise._settlePromise (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:574:26) at Promise._settlePromise0 (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:638:18) at Promise._settlePromise (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:582:21) at Promise._settlePromise0 (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:638:18) at Promise._settlePromise (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:582:21) at Promise._settlePromise0 (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:638:18) at PromiseArray._resolve (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise_array.js:126:19) at PromiseArray._promiseFulfilled (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise_array.js:144:14) at Promise._settlePromise (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:574:26) at Promise._settlePromise0 (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:694:18) at Promise._fulfill (/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/promise.js:638:18) at /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/bluebird/js/release/nodeback.js:42:21 at <embedded>:476:22361 { code: 'MODULE_NOT_FOUND', requireStack: [ '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/packages/server/lib/browsers/utils.ts' ] } }
2024-12-04T16:51:18.325Z cypress:data-context:sources:GitDataSource config: { isRunMode: true, projectRoot: '/Users/frja/dev/control-tower', onError: [Function (anonymous)], onBranchChange: [Function: onBranchChange], onGitInfoChange: [Function: onGitInfoChange], onGitLogChange: [AsyncFunction: onGitLogChange] }
2024-12-04T16:51:18.330Z cypress:scaffold-config:detect Evaluating custom Cypress config file 'cypress/cypress.config.ts'
2024-12-04T16:51:18.330Z cypress:scaffold-config:detect Custom config file is Typescript - using TS
2024-12-04T16:51:18.343Z cypress:server:video using ffmpeg from /Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/@ffmpeg-installer/darwin-arm64/ffmpeg
2024-12-04T16:51:18.349Z cypress:server:run run start
2024-12-04T16:51:18.353Z cypress:lifecycle:ProjectConfigIpc fork child process { CHILD_PROCESS_FILE_PATH: '/Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/require_async_child.js', configProcessArgs: [ '--projectRoot', '/Users/frja/dev/control-tower', '--file', '/Users/frja/dev/control-tower/cypress/cypress.config.ts' ], childOptions: { stdio: 'pipe', cwd: '/Users/frja/dev/control-tower/cypress', execPath: '/Users/frja/.nvm/versions/node/v20.12.2/bin/node' } }
2024-12-04T16:51:18.353Z cypress:lifecycle:ProjectConfigIpc found typescript in /Users/frja/dev/control-tower
2024-12-04T16:51:18.354Z cypress:lifecycle:ProjectConfigIpc using --experimental-specifier-resolution=node with --loader file:///Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/ts-node/esm/transpile-only.mjs
2024-12-04T16:51:18.355Z cypress:lifecycle:ProjectConfigIpc trigger the load of the file
2024-12-04T16:51:18.382Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Chromium (\S+)/m }
2024-12-04T16:51:18.383Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Chromium (\S+)/m }
2024-12-04T16:51:18.391Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Google Chrome (\S+) beta/m }
2024-12-04T16:51:18.399Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Google Chrome Canary (\S+)/m }
2024-12-04T16:51:18.414Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /^Mozilla Firefox (\S+b\S*)$/m }
2024-12-04T16:51:18.414Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /^Mozilla Firefox (\S+b\S*)$/m }
2024-12-04T16:51:18.426Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /^Mozilla Firefox (\S+a\S*)$/m }
2024-12-04T16:51:18.434Z cypress:server:util:process_profiler current & mean memory and CPU usage by process group:
┌─────────┬───────────────────┬──────────────┬────────────────┬────────────┬────────────────┬──────────┬──────────────┬─────────────┐
│ (index) │       group       │ processCount │      pids      │ cpuPercent │ meanCpuPercent │ memRssMb │ meanMemRssMb │ maxMemRssMb │
├─────────┼───────────────────┼──────────────┼────────────────┼────────────┼────────────────┼──────────┼──────────────┼─────────────┤
│    0    │     'cypress'     │      1       │    '84302'     │    81.6    │      81.6      │  356.31  │    356.31    │   356.31    │
│    1    │      'other'      │      1       │    '84303'     │     0      │       0        │   3.17   │     3.17     │    3.17     │
│    2    │ 'electron-shared' │      2       │ '84305, 84304' │     0      │       0        │   0.56   │     0.56     │    0.56     │
│    3    │      'TOTAL'      │      4       │      '-'       │    81.6    │      81.6      │  360.05  │    360.05    │   360.05    │
└─────────┴───────────────────┴──────────────┴────────────────┴────────────┴────────────────┴──────────┴──────────────┴─────────────┘
2024-12-04T16:51:18.435Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /^Mozilla Firefox (\S+a\S*)$/m }
2024-12-04T16:51:18.447Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge (\S+)/im }
2024-12-04T16:51:18.447Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge (\S+)/im }
2024-12-04T16:51:18.458Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/im }
2024-12-04T16:51:18.459Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge.+?(\S*(?= canary)|(?<=canary )\S*)/im }
2024-12-04T16:51:18.469Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/im }
2024-12-04T16:51:18.470Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge.+?(\S*(?= beta)|(?<=beta )\S*)/im }
2024-12-04T16:51:18.481Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge.+?(\S*(?= dev)|(?<=dev )\S*)/im }
2024-12-04T16:51:18.481Z cypress:launcher:linux Could not extract version from stdout using regex: { stdout: '', versionRegex: /Microsoft Edge.+?(\S*(?= dev)|(?<=dev )\S*)/im }
2024-12-04T16:51:18.482Z cypress:server:browsers:utils found browsers { browsers: [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '131.0.6778.86', path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', minSupportedVersion: 64, majorVersion: '131' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', version: '132.0.2', path: '/Applications/Firefox.app/Contents/MacOS/firefox', minSupportedVersion: 86, majorVersion: '132' } ] }
(node:84319) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///Users/frja/Library/Caches/Cypress/13.16.0/Cypress.app/Contents/Resources/app/node_modules/ts-node/esm/transpile-only.mjs", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
2024-12-04T16:51:18.617Z cypress:lifecycle:child:run_require_async_child:84319 configFile: /Users/frja/dev/control-tower/cypress/cypress.config.ts
2024-12-04T16:51:18.617Z cypress:lifecycle:child:run_require_async_child:84319 projectRoot: /Users/frja/dev/control-tower
2024-12-04T16:51:18.622Z cypress:lifecycle:child:run_require_async_child:84319 try loading /Users/frja/dev/control-tower/cypress/cypress.config.ts
2024-12-04T16:51:18.622Z cypress:lifecycle:child:run_require_async_child:84319 Loading file /Users/frja/dev/control-tower/cypress/cypress.config.ts
2024-12-04T16:51:18.622Z cypress:lifecycle:child:run_require_async_child:84319 User is loading an ESM config file
2024-12-04T16:51:18.622Z cypress:lifecycle:child:run_require_async_child:84319 importing esm file file:///Users/frja/dev/control-tower/cypress/cypress.config.ts
2024-12-04T16:51:18.650Z cypress:lifecycle:child:run_require_async_child:84319 error loading file via native Node.js module loader undefined
2024-12-04T16:51:18.662Z cypress:lifecycle:ProjectConfigIpc error loading config {
  name: 'Error',
  message: 'Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts\n' +
    '\n' +
    'It threw an error when required, check the stack trace below:',
  stack: '{}',
  type: 'CONFIG_FILE_REQUIRE_ERROR',
  details: '{}',
  isCypressErr: true,
  messageMarkdown: 'Your `configFile` is invalid: `/Users/frja/dev/control-tower/cypress/cypress.config.ts`\n' +
    '\n' +
    'It threw an error when required, check the stack trace below:',
  originalError: [Object]
}
2024-12-04T16:51:18.662Z cypress:lifecycle:ProjectConfigManager catch { name: 'Error', message: 'Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts\n' + '\n' + 'It threw an error when required, check the stack trace below:', stack: '{}', type: 'CONFIG_FILE_REQUIRE_ERROR', details: '{}', isCypressErr: true, messageMarkdown: 'Your `configFile` is invalid: `/Users/frja/dev/control-tower/cypress/cypress.config.ts`\n' + '\n' + 'It threw an error when required, check the stack trace below:', originalError: { name: 'Error', message: '', stack: '{}' } }
2024-12-04T16:51:18.662Z cypress:lifecycle:ProjectConfigManager catch { name: 'Error', message: 'Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts\n' + '\n' + 'It threw an error when required, check the stack trace below:', stack: '{}', type: 'CONFIG_FILE_REQUIRE_ERROR', details: '{}', isCypressErr: true, messageMarkdown: 'Your `configFile` is invalid: `/Users/frja/dev/control-tower/cypress/cypress.config.ts`\n' + '\n' + 'It threw an error when required, check the stack trace below:', originalError: { name: 'Error', message: '', stack: '{}' } }
2024-12-04T16:51:18.664Z cypress:data-context error thrown by initializeConfig {
  name: 'Error',
  message: 'Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts\n' +
    '\n' +
    'It threw an error when required, check the stack trace below:',
  stack: '{}',
  type: 'CONFIG_FILE_REQUIRE_ERROR',
  details: '{}',
  isCypressErr: true,
  messageMarkdown: 'Your `configFile` is invalid: `/Users/frja/dev/control-tower/cypress/cypress.config.ts`\n' +
    '\n' +
    'It threw an error when required, check the stack trace below:',
  originalError: { name: 'Error', message: '', stack: '{}' }
}
2024-12-04T16:51:18.664Z cypress:server:cypress exiting with err {
  name: 'Error',
  message: 'Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts\n' +
    '\n' +
    'It threw an error when required, check the stack trace below:',
  stack: '{}',
  type: 'CONFIG_FILE_REQUIRE_ERROR',
  details: '{}',
  isCypressErr: true,
  messageMarkdown: 'Your `configFile` is invalid: `/Users/frja/dev/control-tower/cypress/cypress.config.ts`\n' +
    '\n' +
    'It threw an error when required, check the stack trace below:',
  originalError: { name: 'Error', message: '', stack: '{}' }
}
Your configFile is invalid: /Users/frja/dev/control-tower/cypress/cypress.config.ts

It threw an error when required, check the stack trace below:

{}
2024-12-04T16:51:18.664Z cypress:server:cypress calling exit 1
2024-12-04T16:51:18.664Z cypress:server:cypress about to exit with code 1
2024-12-04T16:51:23.670Z cypress:lifecycle:ProjectConfigManager mainProcessWillDisconnect message timed out
2024-12-04T16:51:23.671Z cypress:server:cypress mainProcessWillDisconnect errored with:  undefined
2024-12-04T16:51:23.672Z cypress:server:browsers browsers.kill called with no active instance
2024-12-04T16:51:23.722Z cypress:cli child event fired { event: 'exit', code: 1, signal: null }
2024-12-04T16:51:23.723Z cypress:cli child event fired { event: 'close', code: 1, signal: null }

Other

No response

@jennifer-shehane
Copy link
Member

@fredrik-jansson-se What version was this previously working find on?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Dec 4, 2024
@fredrik-jansson-se
Copy link
Author

@jennifer-shehane, this was working on 13.15.0.

Thanks for getting back to me!

@fredrik-jansson-se
Copy link
Author

Please let me know if I can gather any other info.

@fredrik-jansson-se
Copy link
Author

@fredrik-jansson-se
Copy link
Author

fredrik-jansson-se commented Dec 4, 2024

Changing

on('after:spec', (_spec: Cypress.Spec, results: CypressCommandLine.RunResult) =>

to seems to fix it.

on('after:spec', (_spec, results) => {

I get this error before the change.

Your configFile is invalid: /Users/frja/dev/cy-repro/cypress/cypress.config.ts

It threw an error when required, check the stack trace below:

SyntaxError: Unexpected token ':'
    at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:322:18)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
    at Module._compile (node:internal/modules/cjs/loader:1547:5)
    at Object..js (node:internal/modules/cjs/loader:1708:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:138:16)
    at loadFile (/Users/frja/Library/Caches/Cypress/13.15.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:89:14)
    at EventEmitter.<anonymous> (/Users/frja/Library/Caches/Cypress/13.15.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:116:38)
    at EventEmitter.emit (node:events:524:28)
    at process.<anonymous> (/Users/frja/Library/Caches/Cypress/13.15.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:33:22)
    at process.emit (node:events:524:28)

Not sure what to make of this...

@FelixNumworks
Copy link

FelixNumworks commented Dec 5, 2024

EDIT: This didn't work in the end. I'm not sure why it seemed to have work, but I might have changed multiple things at once without noticing

Changing

on('after:spec', (_spec: Cypress.Spec, results: CypressCommandLine.RunResult) =>

to seems to fix it.

on('after:spec', (_spec, results) => {

This worked for me too. Thanks ! Very weird though.

In my case I went from

function setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions)

to

function setupNodeEvents(on, config)

@fredrik-jansson-se
Copy link
Author

@FelixNumworks, so you have similar issues in your project or did you (kindly) test my stuff? :)

@FelixNumworks
Copy link

@fredrik-jansson-se I have similar issue. It seems to arise after updating Node to v22. I'm not sure yet, I need to investigate

@fredrik-jansson-se
Copy link
Author

@FelixNumworks , thanks!

I had the issue on Node v20, upgrading to Node v22 didn't make it worse.

@jraoult
Copy link

jraoult commented Dec 5, 2024

@FelixNumworks, it might help you with your search: it worked in 22.11.0 and now fails in 22.12.0 and @jennifer-shehane I wouldn't be surprised if it has to do with https://nodejs.org/en/blog/release/v22.12.0#requireesm-is-now-enabled-by-default

@atabixmderks
Copy link

atabixmderks commented Dec 5, 2024

This issue started happening in our pipelines that used the cypress/browsers:latest image, and I can confirm that pinning it to :22.11.0 fixed this issue for now.

@FelixNumworks
Copy link

FelixNumworks commented Dec 5, 2024

Using

NODE_OPTIONS="--no-experimental-require-module" cypress ...

when running Cypress fixed the problem entirely for me.

Thank you @jraoult for pointing the right Node docs

it might help you with your search: it worked in 22.11.0 and now fails in 22.12.0 and @jennifer-shehane I wouldn't be surprised if it has to do with https://nodejs.org/en/blog/release/v22.12.0#requireesm-is-now-enabled-by-default

@jennifer-shehane jennifer-shehane added stage: investigating Someone from Cypress is looking into this existing workaround and removed stage: needs information Not enough info to reproduce the issue labels Dec 9, 2024
@jennifer-shehane
Copy link
Member

We're taking a look at this.

@jennifer-shehane jennifer-shehane changed the title Your configFile is invalid after cypress update Your configFile is invalid with Node.js 22.12.0 Dec 10, 2024
@awsluja
Copy link

awsluja commented Dec 16, 2024

Hi @mschile , do you know when this will release?

@mschile
Copy link
Contributor

mschile commented Dec 16, 2024

@awsluja, it's scheduled to be released tomorrow. In the meantime, you can use this workaround.

@jennifer-shehane jennifer-shehane removed the stage: investigating Someone from Cypress is looking into this label Dec 17, 2024
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 17, 2024

Released in 13.17.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v13.17.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants