Skip to content

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

@YammanureSreekanth

Description

@YammanureSreekanth

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions