jsconfig in VSCode as described in docs doesn't work
See original GitHub issueCurrent behavior:
I think your docs need some modifications. Currently, in IDE Integration, setting up a jsconfig.json
file is mentioned as an alternative way to make Intellisense work in VSCode (instead of adding triple slash directives). But it won’t work. In my case I needed a tsconfig.json
with a "types": ["cypress"]
prop under "compilerOptions"
.
Desired behavior:
I think that “(like VS Code)” in “Reference type declarations via jsconfig” should be removed, since it doesn’t work in that editor. And may cause confusion. Instead it’d better to put it under “Reference type declarations via tsconfig”.
Versions
Cypress 4.8.0 VSCode 1.47.3 Ubuntu 18.04.4 LTS
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
jsconfig in VSCode as described in docs doesn't work #3063
Currently, in IDE Integration, setting up a jsconfig.json file is mentioned as an alternative way to make Intellisense work in VSCode (instead ...
Read more >jsconfig.json Reference - Visual Studio Code
jsconfig.json. What is jsconfig.json? The presence of jsconfig.json file in a directory indicates that the directory is the root of a JavaScript Project....
Read more >VSCode jsconfig.json error "node_modules/agent-base/dist ...
Try adding "exclude": ["node_modules"] as described in the VSCode docs. I added this and restarted VSCode and the error message went away.
Read more >IDE Integration - Cypress Documentation
You can choose to open it in your: File system (e.g. Finder on MacOS, File Explore on Windows); An IDE located on your...
Read more >How to Set Up VS Code for React Development - SitePoint
Implementing the tools and techniques listed in this article will probably save you hours of development work — hours that would have been ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for sharing your resolution @mrmowji
Same thing here, the relative path in
includes
with./node_modules/cypress
andcompilerOptions
with alias path didn’t work together, but when isolated, they work fine. Changing tonode_modules/cypress
, they work together. I also noticed that if adding"src/**/*"
inincludes
, they all work together, even if it’s using relative path./node_modules/cypress
.Here is my configuration in case anyone ends up with this problem:
Initial
jsconfig.json
(from Cypress docs):Then changed to this:
I have to agree with the above poster. I’m in the same boat with this in terms of
jsconfig.json
showing an error in VS Code. I used the solution as provided above but I get the error: “JSON schema for a JavaScript project using TypeScript tooling.”I have done nothing with the project except set it up via the following commands:
That’s it. From there I added the
jsconfig.json
file and put the above suggested contents in place. Everything (to my knowledge) is JavaScript; I’m not sure why “TypeScript tooling” is being indicated.So far I’m getting a lot of field reports from classrooms that they are experiencing the exact same thing.