Type 'AWS.S3' is not assignable to type /node_modules/@types/multer-s3/node_modules/aws-sdk/clients/s3
bertdida opened this issue · 1 comments
bertdida commented
I'm getting this error when building my app. I'm using aws-sdk@^2.1066.0 and multer-s3@^2.10.0. Does anyone know why?
src/routes/middlewares/image-upload.ts:17:3 - error TS2322: Type 'AWS.S3' is not assignable to type 'import("D:/Projects/lambda/driftr-api/node_modules/@types/multer-s3/node_modules/aws-sdk/clients/s3")'.
The types of 'abortMultipartUpload(...).on' are incompatible between these types.
Type '{ (event: string, listener: () => void, prepend?: boolean | undefined): AWS.Request<AWS.S3.AbortMultipartUploadOutput, AWS.AWSError>; (event: "validate", listener: (request: AWS.Request<AWS.S3.AbortMultipartUploadOutput, AWS.AWSError>) => void, prepend?: boolean | undefined): AWS.Request<...>; (event: "build", liste...' is not assignable to type '{ (event: string, listener: () => void, prepend?: boolean | undefined): import("D:/Projects/lambda/driftr-api/node_modules/@types/multer-s3/node_modules/aws-sdk/lib/request").Request<import("D:/Projects/lambda/driftr-api/node_modules/@types/multer-s3/node_modules/aws-sdk/clients/s3").AbortMultipartUploadOutput, impo...'.
Types of parameters 'listener' and 'listener' are incompatible.
17 s3,
~~
Found 1 error.
LinusU commented
This should be fixed in version 3.0.0, which uses the AWS SDK v3