Tabcorp / restify-cors-middleware

CORS middleware with full W3C spec support
108 stars 66 forks source link

Getting exception while adding cors preflight and actual to restify server. #77

Open SreekanthOAuth opened 4 years ago

SreekanthOAuth commented 4 years ago

From today morning we are getting below exception while triggering build (in Linux machine) to remote service.

error TS2345: Argument of type 'RequestHandler' is not assignable to parameter of type 'RequestHandlerType'.

Complete error

src/index.ts(198,12): error TS2345: Argument of type 'RequestHandler' is not assignable to parameter of type 'RequestHandlerType'. Type 'import("/home/vsts/work/1/s/src/virtualAssistant/node_modules/@types/restify-cors-middleware/node_modules/@types/restify/index").RequestHandler' is not assignable to type 'import("/home/vsts/work/1/s/src/virtualAssistant/node_modules/@types/restify/index").RequestHandler'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/home/vsts/work/1/s/src/virtualAssistant/node_modules/@types/restify/index").Request' is not assignable to type 'import("/home/vsts/work/1/s/src/virtualAssistant/node_modules/@types/restify-cors-middleware/node_modules/@types/restify/index").Request'. Types of property 'files' are incompatible.

It's working fine in localhost (Windows 10).

Versions which we are using for below "restify": "^6.3.4", "restify-cors-middleware": "^1.1.1",

Please suggests us on this.

Thanks, Sreekanth

SreekanthOAuth commented 4 years ago

We are stuck. Any updates, please?

Thanks, Sreekanth

SreekanthOAuth commented 4 years ago

Any updates, please?