GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support for Cypress 10.0.x · Issue #342 · browserstack/browserstack-cypress-cli

Support for Cypress 10.0.x #342

New issue
Copy link
New issue
Copy link
Open
Open
Support for Cypress 10.0.x#342
Copy link
Labels
enhancementNew feature or requestNew feature or request

Description

@kmgalanakis
kmgalanakis
opened on Jun 10, 2022
Issue body actions

Hello. Is the CLI going to be updated to support Cypress 10.0.0 and above? Thank you

Reacted by Till Meyer zu Westram, Preston Mitcham, Daniel Roca, PraveenSDET and Coco R.

Activity

  1. pranavj1001 commented on Jun 29, 2022

    @pranavj1001
    pranavj1001
    on Jun 29, 2022
    Member
    More actions

    Hey, support for cypress 10.x.x is currently in progress on BrowserStack and will be released soon.

    Reacted by Brenton Wong, Till Meyer zu Westram, Preston Mitcham, dspaeth-breuni, PraveenSDET, Alex Haase and Coco R.
  2. pranavj1001
    added
    enhancementNew feature or requestNew feature or request
    on Jul 19, 2022
  3. Taapsa commented on Aug 3, 2022

    @Taapsa
    Taapsa
    on Aug 3, 2022
    More actions

    Hey, support for cypress 10.x.x is currently in progress on BrowserStack and will be released soon.

    Hi, any guesstimate when this would happen, weeks, months?

  4. renatobenks commented on Aug 17, 2022

    @renatobenks
    renatobenks
    on Aug 17, 2022
    More actions

    hey @pranavj1001, any estimates on when BrowserStack will get support to cypress latest?

  5. pranavj1001 commented on Aug 22, 2022

    @pranavj1001
    pranavj1001
    on Aug 22, 2022
    Member
    More actions

    BrowserStack now supports Cypress 10. Please update the browserstack-cypress-cli to start running your tests using Cypress 10 on BrowserStack. Here's the link for the docs page.

  6. slowjack2k commented on Aug 22, 2022

    @slowjack2k
    slowjack2k
    on Aug 22, 2022
    More actions

    Does this mean cypress.config.ts is supported as well? With my first try I got a TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for .\cypress.config.ts

  7. Ross-mc commented on Aug 22, 2022

    @Ross-mc
    Ross-mc
    on Aug 22, 2022
    More actions

    I am also having this same error. Browserstack json below:

    "run_settings": {
        "cypress_config_file": "./cypress/cypress.config.ts",
        "project_name": "project-name",
        "build_name": "build-name",
        "exclude": [],
        "parallels": "2",
        "npm_dependencies": {},
        "package_config_options": {},
        "headless": true,
        "cypress_version": "10"
      }

    I am using Cypress v10.3.0 and my Cypress tests run fine.

  8. dspaeth-breuni commented on Aug 22, 2022

    @dspaeth-breuni
    dspaeth-breuni
    on Aug 22, 2022
    More actions

    I was able to get my tests running, but it was not fun. I needed to compile the ts files to js. I used tsc --outDir ./dist/cypress --resolveJsonModule.

    Further more it was important to add cypress, as an npm_dependencies,

    "run_settings": {
            ...
            "npm_dependencies": {
                "cypress": "10.3.0"
            },
            ...
        },
    

    because my cypress.config.ts includes an

    import {defineConfig} from 'cypress';

    After this I needed to copy some files here and there. I don't think it's practical at the moment.

  9. Taapsa commented on Aug 22, 2022

    @Taapsa
    Taapsa
    on Aug 22, 2022
    More actions

    Same thing without TypeScript.
    If cypress.config.js contains
    const { defineConfig } = require("cypress");

    You have to give cypress in npm_dependencies.
    If not CLI returns

    Require stack:
    - ./cypress.config.js
    - /root/node_modules/@packages/server/lib/plugins/child/run_require_async_child.js
    - /root/node_modules/@packages/server/lib/plugins/child/require_async_child.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
        at Function.Module._load (internal/modules/cjs/loader.js:746:27)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:101:18)
        at Object.<anonymous> (./cypress.config.js:1:26)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:12)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:101:18)
        at loadFile (/root/node_modules/@packages/server/lib/plugins/child/run_require_async_child.js:89:14)
        at EventEmitter.<anonymous> (/root/node_modules/@packages/server/lib/plugins/child/run_require_async_child.js:116:38)
        at EventEmitter.emit (events.js:400:28)
        at process.<anonymous> (/root/node_modules/@packages/server/lib/plugins/util.js:33:22)
        at process.emit (events.js:400:28)```
    
  10. dspaeth-breuni commented on Sep 23, 2022

    @dspaeth-breuni
    dspaeth-breuni
    on Sep 23, 2022
    More actions

    will there be typescript support for cypress 10.x in the near feature?

  11. jean-bernard-valentaten commented on Jul 11, 2024

    @jean-bernard-valentaten
    jean-bernard-valentaten
    on Jul 11, 2024
    More actions

    In case you came here because you used TypeScript configuration files for Cypress (which is not mandatory and therefore not a dependency of the cypress package), here is the solution to your problem. The following changes must be made to your browserstack.json:

    {
        "run_settings": {
            "cypress_config_file": "./cypress.config.ts",
            "cypress_version": "13.latest",
            "npm_dependencies": {
                "typescript": "^4.6.3"
            }
        }
    }

    This will tell browserstack-cypress-cli to use the latest Cypress 13 version and add the typescript package to the list of packages that is being generated by browserstack-cypress-cli.
    In case you're planning to use a different version of Cypress, have a look here at how to write the version constraint: https://www.browserstack.com/docs/automate/cypress/supported-versions

    As for adding further dependencies, have a look here: https://www.browserstack.com/docs/automate/cypress/npm-packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.