I\'m trying to build an application using typescript , express . but i\'m getting this error :
Cannot invoke an expression whose type lacks a call signature. Type \'typeo
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 these
import express from "express";
import bodyParser from "body-parser";
The difference is:
// Namespace import
import * as express from "express";
const app = express.default();
// Default import
import express from "express";
const app = express();