Property 'server' Does Not Exist On Type 'typeof "http"'
I know that var someModule = require('someModule') is generally replaced by import * as someModule from 'someModule' but I can't figure out how to use Typescript/ES6 syntax to expr
Solution 1:
Try this:
import { Server, createServer } from'http';
const server = createServer(app);
Clarification: You are using default import instead named import.
Post a Comment for "Property 'server' Does Not Exist On Type 'typeof "http"'"