Typescript + Express : Type 'typeof e' has no compatible call signatures Typescript + Express : Type 'typeof e' has no compatible call signatures express express

Typescript + Express : Type 'typeof e' has no compatible call signatures


You need to import the default export from express instead of the namespace (which is an object with all named exports).

In your app.ts this should be all you need:

// Change theseimport express from "express";import bodyParser from "body-parser";

The difference is:

// Namespace importimport * as express from "express";const app = express.default();// Default importimport express from "express";const app = express();