cannot find type definition file for 'jsdom'

Viewed 26

I am trying to run my existing React, Nextjs projects and this error shows up on my terminal, I have no idea why because those projects were running correctly some few days ago and are running just fine for the rest of my team. It is happening also for some new brand projects. I created a new nestjs project by using the @nestjs/cli after trying to running the first time got the same error in the terminal:

Cannot find type definition file for 'jsdom'.
  The file is in the program because:
    Entry point for implicit type library 'jsdom'

I have tried the following:

  • adding types: ["node", "jest"] to my tsconfig.json it fixes the error, however I would like to understand why at some point I had to start adding this extra config to my existing project even to some just created ones (that are supposed to work), when those projects were working fine.

  • Also uninstalled all nvm node versions and install them back, did not work.

I would appreciate your help, thanks.

0 Answers
Related