(0 , deps_1.saslprep) is not a function

When I am using MongoDB connection with mongoose getting this error. But when I am using the SHA-1 mechanism the error get vanishes. I have also installed the saslprep

We had this connection issue from our AWS lambda (nodeJS / typescript) after upgrading the mongo client driver to (“Version”: “5.7.0”) along with some changes to the ESBuild to reduce the package size. However, it’s a weird issue since we only had this issue in US region. In Europe and APAC regions, our lambda are working fine. After switching the lambda in US region to use passwordless authentication using AWS IAM role, this issue is resolved.

Hope it helps,