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

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

Open
gisheri opened this issue Jun 28, 2022 · 3 comments
Open

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

gisheri opened this issue Jun 28, 2022 · 3 comments

Comments

@gisheri
Copy link

gisheri commented Jun 28, 2022

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

@pranavj1001
Copy link
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

@rao123dk
Copy link

rao123dk commented Sep 6, 2022

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.

@pranavj1001
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants