Build fails - Can't resolve 'mongodb-client-encryption' while building functions

I am building a function that uses mongodb as dependency. When I am building the functions, it’s failing. It was working fine in my last build which was 1 month ago. I haven’t changed any code and I tried to re-deploy the same code again but I am getting this error.

WARNING in …/node_modules/mongodb/lib/operations/connect.js

1:49:11 PM: Module not found: Error: Can’t resolve ‘mongodb-client-encryption’ in ‘/opt/build/repo/node_modules/mongodb/lib/operations’
@ …/node_modules/mongodb/lib/operations/connect.js

1:49:11 PM: @ …/node_modules/mongodb/lib/mongo_client.js

1:49:11 PM: @ …/node_modules/mongodb/index.js

1:49:11 PM: @ ./services/database.js

1:49:11 PM: @ ./api.js

1:49:48 PM:

1:49:48 PM: Treating warnings as errors because process.env.CI = true.

1:49:48 PM: Most CI servers set it automatically.

1:49:48 PM:

1:49:48 PM: Failed to compile.

sitename: smittn-insights

hi there,

please give this a read through, as you have the appropriate message in your build log: