I am trying to create an S3Client using the @aws-sdk/client-s3
package, as shown below:
const { S3Client } = require('@aws-sdk/client-s3')
const client = new S3Client({ region: 'us-east-1' })
It runs fine locally, but when I upload the code to a MongoDB Realm function along with the client-s3 dependency, it throws the error: {"message":"'emitWarning' is not a function","name":"TypeError"}
What might be causing this error?