Cypress: error in jsconfig.json file, please help?

Hi,

I am learning Cypress, but can’t seem to resolve this error I am getting in my jsconfig.josn file. It says,

Blockquote

"File ‘d:/cy-practice/node_modules/cypress/types’ not found.
The file is in the program because:
Matched by include pattern ‘./node_modules/cypress’ in ‘d:/cy-practice/jsconfig.json’

Blockquote

±- cypress@9.2.1
`-- mocha@9.1.4

Check screenshot:

1 Like

Did you add that folder?
That is in general not in the latest cypress installation ( did mine this year)

Since it seems you are currently starting with Cypress try to save what you did ( your tests) and perform a reinstall of cypress.

If you do not want to do that you can remove for now your config file and add the following in each test file

/// <reference types="cypress" />

For IDE integration IDE Integration | Cypress Documentation

2 Likes

Hi, thank you for replying.

Ys, I added that file, because the tutorial I am following it says, if I don’t want to add /// in every spec file, then I should create a file named jsconfig.json and add those line of code there. It was not showing any error, just when I pushed it to remote git repo it started showing this error.

1 Like