Type error: Argument of type ‘ReadableStream’ is not assignable to parameter of type ‘Iterable | AsyncIterable’

Good day,

I have a nextjs project that I have implemented a function for add/deleting files on google drive, I initially got this error while developing Type error: Argument of type 'ReadableStream<Uint8Array>' is not assignable to parameter of type 'Iterable<any> | AsyncIterable<any>' and solved it by manually assigning ReadableStream<Uint8Array> as one of the expected interface inside the stream library, everything worked fine & properly locally both dev and build but then when I try deploying the same project to vercel, during the build process I get this error

Failed to compile.
./config/serverUtils.ts:70:37
Type error: Argument of type 'ReadableStream<Uint8Array>' is not assignable to parameter of type 'Iterable<any> | AsyncIterable<any>'.
  68 |             const media = {
  69 |                 mimeType: file.type,//'application/octet-stream',
> 70 |                 body: Readable.from(fileBuffer),
     |                                     ^
  71 |                //body: fileBuffer
  72 |             };
  73 |
Error: Command "npm run build" exited with 1

This is the full code producing the error ./config/serverUtils.ts

class GoogleDriveCRUD {
    private oauth2client
    private drive

    constructor() {
        this.oauth2client = new google.auth.GoogleAuth({
            credentials: {
                type: data.type,
                project_id: data.project_id,
                private_key_id: data.private_key_id,
                private_key: data.private_key,//process.env.PRIVATE_KEY.replace(/\n/g, 'n'),
                client_email: data.client_email,
                client_id: data.client_id,
                // auth_uri: data.auth_uri,
                // token_uri: data.token_uri,
                // auth_provider_x509_cert_url: data.auth_provider_x509_cert_url,
                // client_x509_cert_url: data.client_x509_cert_url,
                // universe_domain: data.universe_domain,
            },
            scopes: ["https://www.googleapis.com/auth/drive"],
        });
        //this.oauth2client.setCredentials({ refresh_token: refreshToken })
        this.drive = google.drive({
            version: "v3",
            auth: this.oauth2client
        })
    }

    //This function is used to add a file to GDrive
    public async addFile(file: File, folderId: string | void) {
        try {
            const fileBuffer = file.stream();

            const fileMetadata = {
                name: file.name, // The name of the file to be uploaded
                parents: folderId ? [folderId] : undefined, // The ID of the folder where the file should be uploaded
                mimeType: file.type,
            };
        
            const media = {
                mimeType: file.type,//'application/octet-stream',
                body: Readable.from(fileBuffer),
               //body: fileBuffer
            };

            const response = await this.drive.files.create({
                requestBody: fileMetadata,
                media: media,
                fields: "id, imageMediaMetadata",
            })
            
            console.log("Response 1: ", response)
            //console.log("Response 1: ", response.imageMediaMetadata)
            return response.data
        } catch (error) {
            console.log(error)
        }
    }

    //This function helps delete a file from GDrive
    public async deleteFile(driveId: string) {
        try {
            const response = await this.drive.files.delete({
                fileId: driveId
            })
            const res = await this.drive.files.get({
                fileId: ""
            })
            console.log(response)
            //console.log("Response: ", response.data)
        } catch (error) {
            console.log(error)
        }
    }
}

I have tried browsing for answers but have all being in vain, please I’m stranded and would really appreciate any form of help in solving this issue. Thanks!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật