How make Visual Studio Code to stop showing typescript errors for node_modules folder?

How make Visual Studio Code to stop showing typescript errors for node_modules folder?



I've installed some node packages on my project. However there is a few sub modules that contains some typescript errors.



I tried already to add the node_modules to the ignore configuration of tsconfig.json. but those errors still showing up.



How can I ignore them?



enter image description here




2 Answers
2



Those line numbers correspond to the two occurrences of keyof in the declaration file. You'll need to upgrade to TypeScript 2.1 or newer for that to work.


keyof



I tried already to add the node_modules to the ignore configuration of tsconfig.json. but those errors still showing up.



Even if you exclude them from tsconfig.json they get included if they are used by some code in your project.



Fix



Fix the definitions or update your typescript or downgrade the definitions to al older version or delete them if they are not used. Alternatively use --skipLibCheck but this is will result in more issues down the line 🌹


--skipLibCheck






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Help:Category

How can temperature be calculated given relative humidity and dew point?

I have a recursive function to validate tree graph and need a return condition