I am trying to get my first TypeScript and DefinitelyTyped Node.js application up and running, and running into some errors.
I am getting the error \"TS2304: Cannot
I've yet another answer that builds upon all previous ones that describe npm install @types/node
and including node
in tsconfig.json / compilerOptions / types
.
In my case, I have a base tsConfig.json
and a separate one in the Angular application that extends this one:
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
My problem was the empty types
in this tsconfi.app.json
- it clobbers the one in the base configuration.