tsc not excluding node_modules

Alex Kibler picture Alex Kibler · May 18, 2016 · Viewed 12.9k times · Source
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },
  "exclude": [
    "node_modules",
    "typings/main",
    "typings/main.d.ts"
  ]
}

I'm trying to upgrade an angular2/beta8 app to RC1, and I'm doing so by basically restructuring according to the Quickstart guide.

I copied its tsconfig.json into my project directory. I think I've got everything else ready,but when I run tsc, I get all kinds of errors within files in my node_modules folder. Why is it even looking in there in the first place?

Answer

Niko picture Niko · Dec 4, 2020

Add this option in tsconfig.json

{
  "compilerOptions": {
    "skipLibCheck": true
  },
}