Gulp-Node.js Build Issue due to packages

Viewed 11

I am facing one issue while building my node.js application. In my package.json I am having:

morgan:1.9.1
ts-node:"^8.5.4",
typescript:"4.8.3"

Below is the code with line number:

1: app.use(morgan('combined',{skip:(_req:Request,res:ServerResponse)=>res.statusCode<400}));
2: app.use(bodyParser.json({limit:'50mb'}));
3: app.use(bodyParser.raw({limit:'50mb',type:'appliction/pdf'}));
4: app.use(bodyParser.urlencoded({limit:'50mb',extended:true,parametreLimit:50000}));
5: app.use(responseTime());

Following are the errors which I am getting:

src/app.ts(1,16): error TS2769:No overload matches this call.
 The last overload gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'FormatFn'.

src/app.ts(2,9): error TS2769:No overload matches this call.
 The last overload gave the following error.
    Argument of type 'NextHandleFunction' is not assignable to parameter of type 'PathParams'.

src/app.ts(3,9): error TS2769:No overload matches this call.
 The last overload gave the following error.
    Argument of type 'NextHandleFunction' is not assignable to parameter of type 'PathParams'.

src/app.ts(4,9): error TS2769:No overload matches this call.
 The last overload gave the following error.
    Argument of type 'NextHandleFunction' is not assignable to parameter of type 'PathParams'.

src/app.ts(5,9): error TS2769:No overload matches this call.
 The last overload gave the following error.
    Argument of type 'request:IncomingMessage, response:ServerResponse<IncomingMessage',callback:(err:any)=>void)=>any' is not assignable to parameter of type 'PathParams'.

I tried by changing the packages but it is not working.

0 Answers
Related