i'm using Visual Studio Code for NodeJS and Typescript development. If I'm writing this code:
import * as http from 'http';
The compile says error TS2307: Cannot find module 'http'.
How to handle this error?
Greetz
This worked for me:
npm install @types/node --save
I realise it's been a while since the OP, however this is a more updated answer in case someone stumbles across this problem.