Trouble with Typescript + Yarn 3 PNP + VSCode and Cypress #19073
Unanswered
jdborneman-terminus
asked this question in
Questions and Help
Replies: 1 comment
-
Looks like there's an open issue that may be related #22747 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bear with me as I'm relatively new to both TypeScript AND Cypress.
I've got a small stand alone Cypress project I'm using as a POC. I recently upgraded yarn from 1 to 3 to take advantage of PNP and Zero-Installs support. WHen I run my tests on the command line they work WONDERFULLY.
BUT...
VSCode is throwing fits about not finding type definitions for cypress (and a node module I wrote for common stuff for the app we're testing like load, login, navigation)
My root tsconfig.json:
My cypress/tsconfig.json:
VS Code is throwing fits on this file, saying:
Cannot find type definition file for 'cypress'. The file is in the program because: Entry point of type library 'cypress' specified in compilerOptions
There is no "production" for this project since it's all just run for testing, so my devDependencies look like:
cypress-automation-core
is our attempt to write a module that will contain basic stuff like default tags, application login and basic top level navigation, etc. It's being referenced as a github reference until we get an instance of Artifactory stood up. It is also typescript.And finally, a ts file where a very basic test is being written
On this page I'm seeing
Cannot find module X or its corresponding type declarations.
errors onfrom 'cypress-automation-cre'
,describe
,beforeEach
, andit
Any ideas at all as to what we might be doing wrong, or could do better to fix VSCode? I followed the instructions here (https://yarnpkg.com/getting-started/editor-sdks#vscode) including
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions