-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Newly created project with jest and cypress types conflict #892
Comments
I am experiencing the same issue. Our main app is a legacy app and its test-runner is karma. Today I generated a new lib with jest as test runner and now my CI is breaking :/ |
This sounds like a separate issue as this issue pertains to the IDE. Please file an issue with more information about what exactly is failing in your CI and I will jump in when I am available :). |
I'm going to close this issue in favor of #816 which also deals with typing issues in the editor. See #816 (comment) for an update (Good news). |
The issue is worsened with yarn workspaces, where shared modules are hoisted to the project root |
@FrozenPandaz Can we reopen this one or #816? We're seeing the same issue with cypress and jest conflicting. |
Nevermind. VSCode was just being slow, removing the |
@llwt What was the content of the |
@lonix1 {
"extends": "./tsconfig.e2e.json",
} with tsconfig.e2e.json containing: {
"extends": "../../tsconfig.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc/apps/<app-name>-e2e/src",
"lib": ["es2015", "dom"],
"types": ["cypress", "node"]
},
"include": [
"src/**/*.ts",
"../../node_modules/cypress"
]
} |
Small aside, but from the above comment it looks like you may get a cyclical extend. I did when following this. I just removed the extend in I definitely don’t understand all of what’s going on here, but I thought I’d share in case anyone else hits the same issue the way I did. Thanks! |
Here's the official answer to this question, and the config is fewer lines too (only need the two tsconfig files from this example, and the jest transform) https://github.com/cypress-io/cypress-and-jest-typescript-example |
Thanks, it works. But for React projects to cypress/tsconfig.json need to add ".//.tsx" rule: |
one workaround for this is to import the global function explicitly e.g. |
This helped me solve the issue I was having. Thanks! :) |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
after generating a new project and a new app with jest and cypress, the IDE gives the following errors becaus the @types are conflicting
![image](https://user-images.githubusercontent.com/12666898/48204619-5f911580-e351-11e8-9a9e-fcb4bdf8b2dc.png)
related issues:
cypress-io/cypress#1087
microsoft/TypeScript#22331
steps to reproduce:
console error output:
The text was updated successfully, but these errors were encountered: