TypeScript error TS2403: Subsequent variable declarations must have the same type

I added the following property to the tsconfig file

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

This tells TypeScript that we want to skip the type checking of libraries in the node_modules folder. This saves compilation time and stops conflicting types in node modules from breaking the build.
For those who want some explanation on why you might need this option here is a resource link https://www.typescriptlang.org/tsconfig#skipLibCheck

Leave a Comment