Skip to content

Failure when using a tsconfig file with 'extends' #364

Description

@gisheri

The browserstack cli fails to prepare test files if the tsconfig uses 'extends'. If I copy the exact tsconfig that was extended into my compilerOptions rather than using 'extends', then it succeeds. This can be problematic in cases like mine where many services extend a base config.

Repro steps:

  • create any simple POC with cypress tests, but attempt to 'extend' another tsconfig file in your tsconfig.
  • Run the tests with the browserstack CLI
  • Notice the failure "Error: error while parsing tsconfig.json"

Here is a stack overflow question regarding this: https://stackoverflow.com/questions/72128417/run-typescript-cypress-e2e-tests-over-browserstack#comment128082231_72128417

Activity

  1. pranavj1001 commented on Jun 29, 2022

    @pranavj1001
    Member

    So the issue here could be that the base config file might be residing at a different location wrt your cypress.json file. Here, you can use the home_directory config to solve this problem. You can find more info about it here -https://www.browserstack.com/docs/automate/cypress/home-directory

  2. rao123dk commented on Sep 6, 2022

    @rao123dk

    https://stackoverflow.com/questions/72128417/run-typescript-cypress-e2e-tests-over-browserstack#comment128082231_72128417

    This question was asked by me on stackoverflow. I was facing same issue but for that quick resolution I removed extends(I know its not ideal solution). But in cypress 10 cypress.json is no longer, so we need support of cypress10.

  3. pranavj1001 commented on Oct 14, 2022

    @pranavj1001
    Member

    BrowserStack supports Cypress 10. Here is the docs link -> https://www.browserstack.com/docs/automate/cypress Let us know if home_directory doesn't solve the issue.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions